Fix close mapping function

This commit is contained in:
hrsh7th
2021-08-09 19:39:02 +09:00
parent a11ddccb33
commit d5a2c74cf4

View File

@@ -43,11 +43,13 @@ end
---Close menu
menu.close = function(self)
debug.log('menu.close', vim.fn.pumvisible())
if vim.fn.pumvisible() == 1 then
vim.fn.complete(1, {})
end
self:unselect()
vim.schedule(function()
debug.log('menu.close', vim.fn.pumvisible())
if vim.fn.pumvisible() == 1 then
vim.fn.complete(1, {})
end
self:unselect()
end)
end
---Reset menu