From e326775782bc8b9b0e004d5134d602b26ffeb3a5 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 23 Aug 2020 17:42:33 -0400 Subject: Fixed bug where jumping to a find in files result of length 1 highlights wrong. --- modules/textadept/find.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/textadept') diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index ffc4d2b2..231159e2 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -467,7 +467,7 @@ function M.goto_file_found(line_num, next) textadept.editing.select_line() pos = buffer.selection_start + pos - 1 -- absolute pos of result text on line local s = buffer:indicator_end(M.INDIC_FIND, buffer.selection_start) - local e = buffer:indicator_end(M.INDIC_FIND, s + 1) + local e = buffer:indicator_end(M.INDIC_FIND, s) if buffer:line_from_position(s) == buffer:line_from_position(pos) then s, e = s - pos, e - pos -- relative to line start else -- cgit v1.2.3