From ed86f7d04eebc3b7f4bf886f81aca1ea1f68fc32 Mon Sep 17 00:00:00 2001 From: rxi Date: Tue, 12 May 2020 20:04:50 +0100 Subject: [PATCH] Fixed find-replace:select-next erroring on multiline selection --- data/core/commands/findreplace.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/core/commands/findreplace.lua b/data/core/commands/findreplace.lua index da0f9a2..e3e31a3 100644 --- a/data/core/commands/findreplace.lua +++ b/data/core/commands/findreplace.lua @@ -94,7 +94,7 @@ command.add(has_selection, { local l1, c1, l2, c2 = doc():get_selection(true) local text = doc():get_text(l1, c1, l2, c2) 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 })