diff options
author | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2020-09-07 22:08:39 -0400 |
---|---|---|
committer | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2020-09-07 22:08:39 -0400 |
commit | 03da1d1690c4a9b9d6eb5087554cdf01da3a7f34 (patch) | |
tree | b25c520ca631a9aef35fd1a98074ebf8afbbeaa9 /src/textadept.c | |
parent | cd4806ce348ab369d94b8ac6c83fe0b8b7a766a6 (diff) |
Handle initial queries of `ui.find.find_text` and `repl_text` in curses.
Diffstat (limited to 'src/textadept.c')
-rw-r--r-- | src/textadept.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/textadept.c b/src/textadept.c index 0418964a..e9c812fc 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -481,9 +481,9 @@ static int focus_find(lua_State *L) { static int find_index(lua_State *L) { const char *key = lua_tostring(L, 2); if (strcmp(key, "find_entry_text") == 0) - lua_pushstring(L, find_text); + lua_pushstring(L, find_text ? find_text : ""); else if (strcmp(key, "replace_entry_text") == 0) - lua_pushstring(L, repl_text); + lua_pushstring(L, repl_text ? repl_text : ""); else if (strcmp(key, "match_case") == 0) lua_pushboolean(L, checked(match_case)); else if (strcmp(key, "whole_word") == 0) |