From 6fd4459d0c642f696954d18a4162875aba9fdfa1 Mon Sep 17 00:00:00 2001 From: bhagwan Date: Sat, 26 Mar 2022 16:23:32 -0700 Subject: [PATCH] live_grep: save last_query after regex escape --- lua/fzf-lua/providers/grep.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/fzf-lua/providers/grep.lua b/lua/fzf-lua/providers/grep.lua index caf0d7e..a4b2aa1 100644 --- a/lua/fzf-lua/providers/grep.lua +++ b/lua/fzf-lua/providers/grep.lua @@ -188,13 +188,13 @@ M.live_grep_st = function(opts) opts.query = opts.search or '' if opts.search and #opts.search>0 then - -- save the search query so the use can - -- call the same search again - set_last_search(opts, opts.search, true) -- escape unless the user requested not to if not (no_esc or opts.no_esc) then opts.query = utils.rg_escape(opts.search) end + -- save the search query so the use can + -- call the same search again + set_last_search(opts, opts.query, true) end -- search query in header line @@ -269,13 +269,13 @@ M.live_grep_mt = function(opts) local query = opts.search or '' if opts.search and #opts.search>0 then - -- save the search query so the use can - -- call the same search again - set_last_search(opts, opts.search, no_esc or opts.no_esc) -- escape unless the user requested not to if not (no_esc or opts.no_esc) then query = utils.rg_escape(opts.search) end + -- save the search query so the use can + -- call the same search again + set_last_search(opts, query, true) end -- search query in header line