Skip to content

Commit

Permalink
Merge pull request #122 from Cassin01/features/delete-keymap
Browse files Browse the repository at this point in the history
fix: del keymap
  • Loading branch information
Cassin01 authored Nov 23, 2024
2 parents 716f215 + f18cbf6 commit 5b96c73
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lua/wf/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,11 @@ local core = function(choices_obj, groups_obj, which_obj, fuzzy_obj, output_obj,
local g = vim.api.nvim_create_augroup(augname_skip_front_duplicate, { clear = true })
vim.api.nvim_create_autocmd({ "TextChanged", "TextChangedI" }, {
callback = function()
for _, c in ipairs(cs) do
vim.api.nvim_buf_del_keymap(which_obj.buf, "i", c)
end
pcall(function()
for _, c in ipairs(cs) do
vim.api.nvim_buf_del_keymap(which_obj.buf, "i", c)
end
end)
end,
once = true,
buffer = which_obj.buf,
Expand Down

0 comments on commit 5b96c73

Please sign in to comment.