aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
}