aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2013-04-15 19:23:20 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2013-04-15 19:23:20 -0400
commit83cd49cd2a8caec81f9522e8ee6aa14a65941531 (patch)
tree6fe80a534af60862d2638bd66b1d1aa05103d2b5
parent89931cfb63a2bf356ce685747a204ea50e569d55 (diff)
downloadtextadept-83cd49cd2a8caec81f9522e8ee6aa14a65941531.tar.gz
textadept-83cd49cd2a8caec81f9522e8ee6aa14a65941531.zip
Allow updating of curses command entry text from events; src/textadept.c
-rw-r--r--src/textadept.c6
1 files changed, 3 insertions, 3 deletions
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;
}