Skip to content

Commit 6fba227

Browse files
committed
fix: ensure key is passed to nvim when there were no previous mappings
1 parent 56ae9be commit 6fba227

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/copilot/keymaps/init.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,12 @@ function M.register_keymap_with_passthrough(mode, key, action, desc, bufnr)
8686
if prev.type == "rhs" then
8787
logger.trace("Passing through to previous keymap for " .. keymap_key .. ": " .. prev.value)
8888
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(prev.value, true, false, true), mode, true)
89+
return "<Ignore>"
8990
elseif prev.type == "callback" then
9091
logger.trace("Passing through to previous keymap callback for " .. keymap_key)
9192
prev.value()
93+
return "<Ignore>"
9294
end
93-
return "<Ignore>"
9495
end
9596
logger.trace("No previous keymap to pass through for " .. keymap_key)
9697

0 commit comments

Comments
 (0)