diff options
author | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2022-03-17 12:15:18 -0400 |
---|---|---|
committer | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2022-03-17 12:15:18 -0400 |
commit | f81316624d077360447fd4ba977b7cb22ee2061b (patch) | |
tree | a0787e08a3c73d86be844482f98f5ab9097018c6 /modules/textadept/find.lua | |
parent | 4cdb674929e79104d9f5301656f4169b0fe86f43 (diff) |
Fixed "Find Next" for zero-width regex searches.
"Find Prev" still does not work and appears to be a Scintilla bug.
Diffstat (limited to 'modules/textadept/find.lua')
-rw-r--r-- | modules/textadept/find.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 67fe1038..4c0bf21b 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -213,6 +213,8 @@ local function find(text, next, flags, no_wrap, wrapped) -- If text is selected, assume it is from the current search and move the caret appropriately -- for the next search. buffer:goto_pos(next and buffer.selection_end or buffer.selection_start) + if not M.incremental and M.regex and find_text == text and found_text == '' and next and + not wrapped then buffer:goto_pos(buffer.current_pos + (next and 1 or -1)) end -- Scintilla search. buffer:search_anchor() |