File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1252,6 +1252,7 @@ function Previewer.buffer_or_file:set_cursor_hl(entry)
12521252 end )()
12531253 end
12541254
1255+ local case_sensitive = regex and regex :lower () ~= regex
12551256 -- If called from tags previewer, can happen when using ctags cmd
12561257 -- "ctags -R --c++-kinds=+p --fields=+iaS --extras=+q --excmd=combine"
12571258 -- vim.regex is always magic, see `:help vim.regex`
@@ -1307,7 +1308,7 @@ function Previewer.buffer_or_file:set_cursor_hl(entry)
13071308 --- @diagnostic disable-next-line : param-type-mismatch
13081309 local reg = utils .vim_regex (regex , { silent = true })
13091310 if reg then
1310- if regex ~= regex : lower () then
1311+ if case_sensitive then
13111312 regex_start , regex_end = reg :match_line (buf , lnum - 1 , col - 1 )
13121313 else
13131314 local line = api .nvim_buf_get_lines (buf , lnum - 1 , lnum , false )[1 ] or " "
You can’t perform that action at this time.
0 commit comments