Skip to content

Commit 1f52c26

Browse files
phanenibhagwan
authored andcommitted
fix: don't apply vim.regex on --fix-strings (#2363)
1 parent 2388dcd commit 1f52c26

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lua/fzf-lua/previewer/builtin.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ function Previewer.buffer_or_file:set_cursor_hl(entry)
12261226
(function()
12271227
-- Check both the cmd and glob_args in case the user has a custom
12281228
-- `rg_glob_fn` which uses raw args (as the wiki example)
1229-
for _, s in ipairs({ self.opts.cmd, glob_args }) do
1229+
for _, s in ipairs({ self.opts.cmd or self.opts._cmd, glob_args }) do
12301230
if s and (s:match("%-%-fixed%-strings") or s:match("%-F")) then
12311231
regex = utils.rg_escape(regex)
12321232
return

lua/fzf-lua/providers/grep.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ M.live_grep = function(opts)
133133
opts = normalize_live_grep_opts(opts)
134134
if not opts then return end
135135

136-
-- register opts._cmd, toggle_ignore/title_flag
136+
-- register opts._cmd, toggle_ignore/title_flag/--fixed-strings
137137
local cmd0 = get_grep_cmd(opts, core.fzf_query_placeholder, 2)
138138

139139
-- if multiprocess is optional (=1) and no prpocessing is required

0 commit comments

Comments
 (0)