Skip to content

Commit

Permalink
fix: passthrough bind on show/hide when shown/hidden
Browse files Browse the repository at this point in the history
closes #49
  • Loading branch information
Saghen committed Oct 9, 2024
1 parent 4daf96d commit a5145ae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/blink/cmp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@ end
------- Public API -------

cmp.show = function()
vim.schedule(function() cmp.trigger.show() end)
if cmp.windows.autocomplete.win:is_open() then return end
vim.schedule(cmp.trigger.show)
return true
end

cmp.hide = function()
vim.schedule(function() cmp.trigger.hide() end)
if not cmp.windows.autocomplete.win:is_open() then return end
vim.schedule(cmp.trigger.hide)
return true
end

Expand Down

0 comments on commit a5145ae

Please sign in to comment.