fix: fix close hover window twice in some case
This commit is contained in:
parent
c154ee94b5
commit
09806f01a6
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user