Fixed find-replace:select-next erroring on multiline selection

This commit is contained in:
rxi 2020-05-12 20:04:50 +01:00
parent 7f6a2710ef
commit ed86f7d04e
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ command.add(has_selection, {
local l1, c1, l2, c2 = doc():get_selection(true) local l1, c1, l2, c2 = doc():get_selection(true)
local text = doc():get_text(l1, c1, l2, c2) local text = doc():get_text(l1, c1, l2, c2)
local l1, c1, l2, c2 = search.find(doc(), l2, c2, text, { wrap = true }) local l1, c1, l2, c2 = search.find(doc(), l2, c2, text, { wrap = true })
doc():set_selection(l2, c2, l1, c1) if l2 then doc():set_selection(l2, c2, l1, c1) end
end end
}) })