diff options
author | 2015-01-12 18:32:20 -0500 | |
---|---|---|
committer | 2015-01-12 18:32:20 -0500 | |
commit | 44afcd157ce82b5492b31474b4d38a56084fee89 (patch) | |
tree | cc68fec8b855465a2dc9245c3b0985d67559a049 | |
parent | e0bf08c3199dd01d575df4f0d4d7faf54c9034a4 (diff) | |
download | textadept-44afcd157ce82b5492b31474b4d38a56084fee89.tar.gz textadept-44afcd157ce82b5492b31474b4d38a56084fee89.zip |
Emit an `events.FOCUS` event after resuming from a suspended state.
-rw-r--r-- | core/events.lua | 3 | ||||
-rw-r--r-- | src/textadept.c | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/core/events.lua b/core/events.lua index 5b7e92fd..144917a7 100644 --- a/core/events.lua +++ b/core/events.lua @@ -119,7 +119,8 @@ local M = {} -- * _`next`_: Whether or not to search forward. -- @field FOCUS (string) -- Emitted when Textadept receives focus. --- This event is never emitted when Textadept is running in the terminal. +-- In the terminal, this event is only emitted after resuming from a suspended +-- state. -- @field HOTSPOT_CLICK (string) -- Emitted when clicking on text that is in a style that has the hotspot -- attribute set. diff --git a/src/textadept.c b/src/textadept.c index 3061b256..1b1dad0e 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -2387,6 +2387,7 @@ static void t_signal(int signal) { resizeterm(w.ws_row, w.ws_col), pane_resize(pane, LINES - 2, COLS, 1, 0); WINDOW *ce_win = scintilla_get_window(command_entry); wresize(ce_win, 1, COLS), mvwin(ce_win, LINES - 1 - getmaxy(ce_win), 0); + if (signal == SIGCONT) lL_event(lua, "focus", -1); lL_event(lua, "update_ui", -1); refresh_all(); } else endwin(), termkey_stop(ta_tk), kill(0, SIGSTOP); |