fix: fix close hover window twice in some case

This commit is contained in:
JuanZoran 2023-01-20 22:32:53 +08:00
parent c154ee94b5
commit 09806f01a6

View File

@ -198,7 +198,11 @@ local action = {
if pin then
error('too many window')
end
if cmd_id > 0 then
api.nvim_del_autocmd(cmd_id)
cmd_id = -1
end
m_window:set('wrap', false)
m_window:try_close(function()
@ -228,6 +232,11 @@ local action = {
end,
close = function()
if cmd_id > 0 then
api.nvim_del_autocmd(cmd_id)
cmd_id = -1
end
m_window:set('wrap', false)
m_window:try_close()
try_del_keymap()