From 83cd49cd2a8caec81f9522e8ee6aa14a65941531 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 15 Apr 2013 19:23:20 -0400 Subject: Allow updating of curses command entry text from events; src/textadept.c --- src/textadept.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/textadept.c') diff --git a/src/textadept.c b/src/textadept.c index 5dfa23b4..e58a0cf1 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -672,14 +672,14 @@ static int lce__index(lua_State *L) { /** `command_entry.__newindex` Lua metatable. */ static int lce__newindex(lua_State *L) { const char *key = lua_tostring(L, 2); - if (strcmp(key, "entry_text") == 0) + if (strcmp(key, "entry_text") == 0) { #if GTK gtk_entry_set_text(GTK_ENTRY(command_entry), lua_tostring(L, 3)); #elif CURSES + if (command_entry) setCDKEntryValue(command_entry, lua_tostring(L, 3)); fcopy(&command_text, lua_tostring(L, 3)); #endif - else - lua_rawset(L, 1); + } else lua_rawset(L, 1); return 0; } -- cgit v1.2.3