File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 63
63
function M :_add (keys )
64
64
local lhs = keys [1 ]
65
65
local opts = M .opts (keys )
66
- opts .remap = true
67
- opts .expr = true
68
- opts .replace_keycodes = false
69
66
vim .keymap .set (keys .mode , lhs , function ()
70
67
local plugins = self .active [keys .id ]
71
68
@@ -76,8 +73,15 @@ function M:_add(keys)
76
73
Util .track ({ keys = lhs })
77
74
Loader .load (plugins , { keys = lhs })
78
75
Util .track ()
79
- return vim .api .nvim_replace_termcodes (" <Ignore>" .. lhs , false , true , true )
80
- end , opts )
76
+
77
+ local feed = vim .api .nvim_replace_termcodes (" <Ignore>" .. lhs , true , true , true )
78
+ -- insert instead of append the lhs
79
+ vim .api .nvim_feedkeys (feed , " i" , false )
80
+ end , {
81
+ desc = opts .desc ,
82
+ -- we do not return anything, but this is still needed to make operator pending mappings work
83
+ expr = true ,
84
+ })
81
85
end
82
86
83
87
--- @param keys LazyKeys
You can’t perform that action at this time.
0 commit comments