From 53bd5749011c0830d54d9b22a37259651d5916df Mon Sep 17 00:00:00 2001 From: hrsh7th <629908+hrsh7th@users.noreply.github.com> Date: Tue, 11 Oct 2022 11:44:23 +0900 Subject: [PATCH] Fix #1213 --- lua/cmp/utils/keymap.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/cmp/utils/keymap.lua b/lua/cmp/utils/keymap.lua index 4ef23cb..c48af51 100644 --- a/lua/cmp/utils/keymap.lua +++ b/lua/cmp/utils/keymap.lua @@ -136,6 +136,7 @@ keymap.fallback = function(bufnr, mode, map) script = map.script, nowait = map.nowait, silent = map.silent and mode ~= 'c', + replace_keycodes = map.replace_keycodes, }) vim.api.nvim_feedkeys(keymap.t(fallback_lhs), 'im', true) elseif map.callback then @@ -170,6 +171,7 @@ keymap.solve = function(bufnr, mode, map) script = true, nowait = map.nowait, silent = map.silent and mode ~= 'c', + replace_keycodes = map.replace_keycodes, }) return { keys = keymap.t(recursive) .. string.gsub(rhs, '^' .. vim.pesc(lhs), ''), mode = 'im' } end @@ -195,6 +197,7 @@ keymap.get_map = function(mode, lhs) silent = map.silent == 1, nowait = map.nowait == 1, buffer = true, + replace_keycodes = map.replace_keycodes == 1, } end end @@ -211,6 +214,7 @@ keymap.get_map = function(mode, lhs) silent = map.silent == 1, nowait = map.nowait == 1, buffer = false, + replace_keycodes = map.replace_keycodes == 1, } end end @@ -225,6 +229,7 @@ keymap.get_map = function(mode, lhs) silent = true, nowait = false, buffer = false, + replace_keycodes = true, } end