diff options
author | 2020-11-16 19:48:46 -0500 | |
---|---|---|
committer | 2020-11-16 19:48:46 -0500 | |
commit | 4d661eb109e242db21deb2667b60b3a3f48c2fc7 (patch) | |
tree | a1a5b061880c73bee6bdf6d672b4bfe73f3d570f /core/events.lua | |
parent | b421b229cf3c5f23f297ca9195e84b616a27b4ad (diff) | |
download | textadept-4d661eb109e242db21deb2667b60b3a3f48c2fc7.tar.gz textadept-4d661eb109e242db21deb2667b60b3a3f48c2fc7.zip |
Added `events.UNFOCUS` for when Textadept loses focus.
Do not emit this event when a dialog is active.
Diffstat (limited to 'core/events.lua')
-rw-r--r-- | core/events.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/events.lua b/core/events.lua index 1c146145..6f29e0a1 100644 --- a/core/events.lua +++ b/core/events.lua @@ -270,6 +270,9 @@ local M = {} -- * _`ctrl`_: The "Control" modifier key is held down. -- * _`alt`_: The "Alt"/"Option" modifier key is held down. -- * _`cmd`_: The "Command" modifier key on macOS is held down. +-- @field UNFOCUS (string) +-- Emitted when Textadept loses focus. +-- This event is never emitted when Textadept is running in the terminal. -- @field UPDATE_UI (string) -- Emitted after the view is visually updated. -- Arguments: @@ -399,7 +402,7 @@ end) -- Set event constants. for _, v in pairs(_SCINTILLA.events) do M[v[1]:upper()] = v[1] end -local textadept_events = {'appleevent_odoc','buffer_after_switch','buffer_before_switch','buffer_deleted','buffer_new','csi','command_text_changed','error','find','find_text_changed','focus','initialized','keypress','menu_clicked','mouse','quit','replace','replace_all','reset_after','reset_before','resume','suspend', 'tab_clicked','view_after_switch','view_before_switch','view_new'} +local textadept_events = {'appleevent_odoc','buffer_after_switch','buffer_before_switch','buffer_deleted','buffer_new','csi','command_text_changed','error','find','find_text_changed','focus','initialized','keypress','menu_clicked','mouse','quit','replace','replace_all','reset_after','reset_before','resume','suspend', 'tab_clicked','unfocus','view_after_switch','view_before_switch','view_new'} for _, v in pairs(textadept_events) do M[v:upper()] = v end return M |