Skip to content

Commit

Permalink
fix: schedule just feedkeys to close completion menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Saghen committed Feb 14, 2025
1 parent 2b7fbe9 commit 363f351
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/blink/cmp/lib/text_edits.lua
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,9 @@ function text_edits.write_to_dot_repeat(text_edit)

-- exit completion mode (if still open)
if vim.api.nvim_get_mode().mode:match('i') then
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<C-x><C-z>', true, true, true), 'in', false)
vim.schedule(
function() vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes('<C-x><C-z>', true, true, true), 'in', false) end
)
end
end)
end
Expand Down

0 comments on commit 363f351

Please sign in to comment.