Skip to content

Commit

Permalink
fix(previewer): regex escape --fixed-strings (closes ibhagwan#1641)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Dec 25, 2024
1 parent 8595c60 commit 7307943
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/fzf-lua/previewer/builtin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,9 @@ function Previewer.buffer_or_file:set_cursor_hl(entry)
or self.opts.__ACT_TO == mgrep.live_grep and self.opts.search or nil
if regex and self.opts.rg_glob and self.opts.glob_separator then
regex = require("fzf-lua.make_entry").glob_parse(regex, self.opts)
if self.opts.cmd:match("%-%-fixed-strings") or self.opts.cmd:match("%-F") then
regex = utils.rg_escape(regex)
end
end

-- If called from tags previewer, can happen when using ctags cmd
Expand Down

0 comments on commit 7307943

Please sign in to comment.