From 4ab8ee76c30fc585b7fb1bdde10b2a93b8fa3ca4 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 23 Oct 2018 14:33:17 -0400 Subject: Make find and menu command selection more macro-friendly. --- modules/textadept/find.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/textadept/find.lua') diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 796c8434..53fb8498 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -172,7 +172,10 @@ local function find_incremental(text, next, anchor) next and 1 or -1) end buffer:goto_pos(incremental_start or 0) - find(text, next, M.match_case and buffer.FIND_MATCHCASE or 0) + -- Note: even though `events.FIND` does not support a flags parameter, the + -- default handler has one, so make use of it. + events.emit(events.FIND, text, next, + M.match_case and buffer.FIND_MATCHCASE or 0) end --- -- cgit v1.2.3