From 695d0dbcd2df2638cb6f218748a99b88fc702b2f Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sun, 18 Jun 2023 20:24:32 +0800 Subject: [PATCH] fix(flygrep): fix history updating --- lua/spacevim/plugin/flygrep.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/spacevim/plugin/flygrep.lua b/lua/spacevim/plugin/flygrep.lua index 04a3804af..e20a27676 100644 --- a/lua/spacevim/plugin/flygrep.lua +++ b/lua/spacevim/plugin/flygrep.lua @@ -91,7 +91,7 @@ local function update_history() if vim.fn.index(grep_history, grep_expr) >= 0 then vim.fn.remove(grep_history, vim.fn.index(grep_history, grep_expr)) end - vim.fn.add(grep_history, grep_expr) + table.insert(grep_history, grep_expr) if vim.fn.isdirectory(vim.fn.expand(vim.g.spacevim_data_dir .. 'SpaceVim')) == 0 then vim.fn.mkdir(vim.fn.expand(vim.g.spacevim_data_dir .. 'SpaceVim')) end