From 881ca573dbbf39ebef6b15d3e3b484484aec53b3 Mon Sep 17 00:00:00 2001 From: hrsh7th Date: Thu, 28 Oct 2021 00:50:50 +0900 Subject: [PATCH] Re-support script mapping --- lua/cmp/utils/keymap.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/cmp/utils/keymap.lua b/lua/cmp/utils/keymap.lua index ed15150..d3c418f 100644 --- a/lua/cmp/utils/keymap.lua +++ b/lua/cmp/utils/keymap.lua @@ -270,6 +270,9 @@ keymap.evacuate = function(mode, lhs) elseif map.noremap ~= 0 and map.expr == 1 then -- noremap & expr mapping should always evacuate as mapping. rhs = rhs + elseif map.script == 1 then + -- script mapping should always evacuate as mapping. + rhs = rhs elseif map.noremap == 0 then -- remap & non-expr mapping should be checked if recursive or not. rhs = keymap.recursive(mode, lhs, rhs)