diff options
Diffstat (limited to 'modules/textadept/find.lua')
-rw-r--r-- | modules/textadept/find.lua | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 50b557ba..cb0bd449 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -115,10 +115,9 @@ local escapes = { local function find_(text, next, flags, no_wrap, wrapped) if text == '' then return end if not flags then - local c = _SCINTILLA.constants flags = 0 - if M.match_case then flags = flags + c.SCFIND_MATCHCASE end - if M.whole_word then flags = flags + c.SCFIND_WHOLEWORD end + if M.match_case then flags = flags + buffer.SCFIND_MATCHCASE end + if M.whole_word then flags = flags + buffer.SCFIND_WHOLEWORD end if M.lua then flags = flags + 8 end if M.in_files then flags = flags + 16 end end @@ -183,7 +182,7 @@ local function find_incremental(text, next, anchor) M.incremental_start = buffer.current_pos + (next and 1 or -1) end buffer:goto_pos(M.incremental_start or 0) - find_(text, next, M.match_case and _SCINTILLA.constants.SCFIND_MATCHCASE or 0) + find_(text, next, M.match_case and buffer.SCFIND_MATCHCASE or 0) end --- @@ -360,11 +359,11 @@ function M.goto_file_found(line, next) if next then buffer:line_end() else buffer:home() end buffer:search_anchor() local f = buffer['search_'..(next and 'next' or 'prev')] - local pos = f(buffer, _SCINTILLA.constants.SCFIND_REGEXP, '^.+:[0-9]+:.+$') + local pos = f(buffer, buffer.SCFIND_REGEXP, '^.+:[0-9]+:.+$') if pos == -1 then buffer:goto_line(next and 0 or buffer.line_count) buffer:search_anchor() - pos = f(buffer, _SCINTILLA.constants.SCFIND_REGEXP, '^.+:[0-9]+:.+$') + pos = f(buffer, buffer.SCFIND_REGEXP, '^.+:[0-9]+:.+$') end if pos == -1 then if CURSES then view:goto_buffer(cur_buf) end return end line = buffer:line_from_position(pos) |