Fix vim.fn.complete being constantly called (#654)

This commit is contained in:
Dmytro Meleshko
2021-12-20 07:54:16 +02:00
committed by GitHub
parent b11f8bbee3
commit 9c07c2d1c5

View File

@@ -77,7 +77,7 @@ native_entries_view.open = function(self, offset, entries)
end end
native_entries_view.close = function(self) native_entries_view.close = function(self)
if api.is_suitable_mode() then if api.is_suitable_mode() and self:visible() then
vim.fn.complete(1, {}) vim.fn.complete(1, {})
vim.api.nvim_select_popupmenu_item(-1, false, true, {}) vim.api.nvim_select_popupmenu_item(-1, false, true, {})
end end