Fix documentation window closing bug
This commit is contained in:
@@ -43,6 +43,7 @@ end
|
|||||||
|
|
||||||
---Close menu
|
---Close menu
|
||||||
menu.close = function(self)
|
menu.close = function(self)
|
||||||
|
debug.log('menu.close', vim.fn.pumvisible())
|
||||||
if vim.fn.pumvisible() == 1 then
|
if vim.fn.pumvisible() == 1 then
|
||||||
vim.fn.complete(1, {})
|
vim.fn.complete(1, {})
|
||||||
end
|
end
|
||||||
@@ -157,10 +158,11 @@ end
|
|||||||
|
|
||||||
---Show completion item
|
---Show completion item
|
||||||
menu.show = function(self)
|
menu.show = function(self)
|
||||||
if vim.fn.pumvisible() == 0 and #self.entries == 0 then
|
if #self.entries == 0 then
|
||||||
self:close()
|
self:close()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
debug.log('menu.show', #self.entries)
|
||||||
|
|
||||||
local completeopt = vim.o.completeopt
|
local completeopt = vim.o.completeopt
|
||||||
if self.preselect == 1 then
|
if self.preselect == 1 then
|
||||||
|
|||||||
Reference in New Issue
Block a user