diff options
author | 2018-05-22 23:23:18 -0400 | |
---|---|---|
committer | 2018-05-22 23:23:18 -0400 | |
commit | 213cb37d1d2571f26f970f4b4fff2ba6b0018797 (patch) | |
tree | 39642789ced1ea5362c498403f5013491aa1ad4a /modules/textadept | |
parent | 35e8196dad53a84692c3488b705b0623de2b961a (diff) | |
download | textadept-213cb37d1d2571f26f970f4b4fff2ba6b0018797.tar.gz textadept-213cb37d1d2571f26f970f4b4fff2ba6b0018797.zip |
Fixed selection of find in files result if it's at the start of the line.
Diffstat (limited to 'modules/textadept')
-rw-r--r-- | modules/textadept/find.lua | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index c1a664c8..7a0a0d0c 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -113,15 +113,6 @@ local preferred_view -- @name find_in_files_filter M.find_in_files_filter = lfs.default_filter --- Text escape sequences with their associated characters and vice-versa. --- @class table --- @name escapes -local escapes = { - ['\\a'] = '\a', ['\\b'] = '\b', ['\\f'] = '\f', ['\\n'] = '\n', - ['\\r'] = '\r', ['\\t'] = '\t', ['\\v'] = '\v', ['\\\\'] = '\\' -} -for k, v in pairs(escapes) do escapes[v] = k end - -- Keep track of find text and found text so that "replace all" works as -- expected during a find session ("replace all" with selected text normally -- does "replace in selection"). @@ -416,7 +407,7 @@ function M.goto_file_found(line_num, next) if not utf8_filename then return end textadept.editing.select_line() pos = buffer.anchor + pos - 1 -- absolute position of result text on line - local s = buffer:indicator_end(M.INDIC_FIND, pos) + local s = buffer:indicator_end(M.INDIC_FIND, pos - 1) local e = buffer:indicator_end(M.INDIC_FIND, s + 1) if buffer:line_from_position(s) == buffer:line_from_position(pos) then s, e = s - pos, e - pos -- relative to line start |