From 46e939a3e6101d69fc7a3b791bd741241dab2737 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 20 Jun 2021 21:34:42 -0400 Subject: [PATCH] Fixed a minor bug. --- data/core/commands/findreplace.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/core/commands/findreplace.lua b/data/core/commands/findreplace.lua index 47f5f001..aadae66d 100644 --- a/data/core/commands/findreplace.lua +++ b/data/core/commands/findreplace.lua @@ -148,8 +148,8 @@ command.add(valid_for_finding, { if not last_fn then core.error("No find to continue from") else - local line, col = doc():get_selection() - local line1, col1, line2, col2 = last_fn(doc(), line, col, last_text, case_insensitive, plain) + local sl1, sc1, sl2, sc2 = doc():get_selection(true) + local line1, col1, line2, col2 = last_fn(doc(), sl1, sc2, last_text, case_insensitive, plain) if line1 then if last_view.doc ~= doc() then last_finds = {} @@ -157,7 +157,7 @@ command.add(valid_for_finding, { if #last_finds >= max_last_finds then table.remove(last_finds, 1) end - table.insert(last_finds, { line, col }) + table.insert(last_finds, { sl1, sc1, sl2, sc2 }) doc():set_selection(line2, col2, line1, col1) last_view:scroll_to_line(line2, true) end