diff --git a/lua/fzf-lua/previewer/builtin.lua b/lua/fzf-lua/previewer/builtin.lua index ba9fc3ad..4f36eaf3 100644 --- a/lua/fzf-lua/previewer/builtin.lua +++ b/lua/fzf-lua/previewer/builtin.lua @@ -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