1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 20:00:05 +08:00

fix(flygrep): restore grepid when mpt is empty string

This commit is contained in:
wsdjeg 2023-06-17 13:09:08 +08:00
parent a8d4a7392d
commit 739210c76c

View File

@ -248,7 +248,9 @@ end
local function flygrep(t)
mpt._build_prompt()
if t == '' then
vim.cmd('redrawstatus')
-- if the insert text is empty, clear grepid
grepid = 0
update_statusline()
return
end
pcall(vim.fn.matchdelete, hi_id)