From 58320a257957e4083f866cc6458b04a72493df33 Mon Sep 17 00:00:00 2001 From: bhagwan Date: Sat, 9 Apr 2022 08:08:33 -0700 Subject: [PATCH] live_grep_glob: start showing results as soon as separator is found --- lua/fzf-lua/make_entry.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/fzf-lua/make_entry.lua b/lua/fzf-lua/make_entry.lua index 91b4d6b..379157e 100644 --- a/lua/fzf-lua/make_entry.lua +++ b/lua/fzf-lua/make_entry.lua @@ -213,10 +213,10 @@ M.glob_parse = function(opts, query) if config.globals.grep.rg_glob_fn then return config.globals.grep.rg_glob_fn(opts, query) end - local glob_args = nil + local glob_args = "" local search_query, glob_str = query:match("(.*)"..opts.glob_separator.."(.*)") for _, s in ipairs(utils.strsplit(glob_str, "%s")) do - glob_args = (glob_args or "") .. ("%s %s ") + glob_args = glob_args .. ("%s %s ") :format(opts.glob_flag, vim.fn.shellescape(s)) end return search_query, glob_args