From 03da1d1690c4a9b9d6eb5087554cdf01da3a7f34 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+orbitalquark@users.noreply.github.com> Date: Mon, 7 Sep 2020 22:08:39 -0400 Subject: Handle initial queries of `ui.find.find_text` and `repl_text` in curses. --- src/textadept.c | 4 ++-- 1 file 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) -- cgit v1.2.3