diff options
-rw-r--r-- | modules/textadept/command_entry.lua | 1 | ||||
-rw-r--r-- | src/textadept.c | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua index f6a82baa..18f72e20 100644 --- a/modules/textadept/command_entry.lua +++ b/modules/textadept/command_entry.lua @@ -253,7 +253,6 @@ end local orig_focus = M.focus M.focus = function() keys.mode = prev_key_mode - M.active = not M.active orig_focus() end diff --git a/src/textadept.c b/src/textadept.c index 994002c1..8695bc0f 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -1321,7 +1321,10 @@ static int buffer_index(lua_State *L) { //#elif CURSES // TODO: tabs #endif - } else if (strcmp(lua_tostring(L, 2), "height") == 0 && + } else if (strcmp(lua_tostring(L, 2), "active") == 0 && + lua_todoc(L, 1) == SS(command_entry, SCI_GETDOCPOINTER, 0, 0)) + lua_pushboolean(L, command_entry_focused); + else if (strcmp(lua_tostring(L, 2), "height") == 0 && lua_todoc(L, 1) == SS(command_entry, SCI_GETDOCPOINTER, 0, 0)) { // Return the command entry's pixel height. #if GTK |