aboutsummaryrefslogtreecommitdiffhomepage
path: root/core
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-07-25 00:20:13 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-07-25 00:20:13 -0400
commit44beff91b257a9d7874e20790d50a8568990d9e6 (patch)
tree23167dab39f2475c9d65a73cffa1ccb59febcb39 /core
parent8cfb09b23bf718af6a705291b74abb4e2c62b7e3 (diff)
Moved incremental find into Find & Replace Pane.
Added new `events.FIND_TEXT_CHANGED` to help facilitate this. "Whole word" and "Regex" are now supported in addition to "Match case". Also updated tests.
Diffstat (limited to 'core')
-rw-r--r--core/events.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/events.lua b/core/events.lua
index 34943e1d..eb60c99b 100644
--- a/core/events.lua
+++ b/core/events.lua
@@ -133,6 +133,10 @@ local M = {}
--
-- * _`text`_: The text to search for.
-- * _`next`_: Whether or not to search forward.
+-- @field FIND_TEXT_CHANGED (string)
+-- Emitted when the text in the "Find" field of the Find & Replace Pane
+-- changes.
+-- `ui.find.find_entry_text` contains the current text.
-- @field FOCUS (string)
-- Emitted when Textadept receives focus.
-- This event is never emitted when Textadept is running in the terminal.
@@ -391,9 +395,9 @@ end)
for _, v in pairs(_SCINTILLA.events) do M[v[1]:upper()] = v[1] end
local textadept_events = { -- defined in C
'appleevent_odoc', 'buffer_after_switch', 'buffer_before_switch',
- 'buffer_deleted', 'buffer_new', 'csi', 'error', 'find', 'focus',
- 'initialized', 'keypress', 'menu_clicked', 'mouse', 'quit', 'replace',
- 'replace_all', 'reset_after', 'reset_before', 'resume', 'suspend',
+ 'buffer_deleted', 'buffer_new', 'csi', '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'
}
for _, v in pairs(textadept_events) do M[v:upper()] = v end