From 114ed132a3e73462d0984e832adafe2034718e73 Mon Sep 17 00:00:00 2001 From: Bazaah Date: Sun, 18 Aug 2024 18:11:13 +0000 Subject: [PATCH] fix(map_util): add `` after string bindings If you have two bindings, one that's a prefix to another: - MyScript:Cmd - MyScript:Cmd2 If you try and use the prefix binding, vim will wait for `ttimeoutlen` Co-authored-by: Oliver Marshall --- lua/dressing/map_util.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/dressing/map_util.lua b/lua/dressing/map_util.lua index f833f8a..55d12b9 100644 --- a/lua/dressing/map_util.lua +++ b/lua/dressing/map_util.lua @@ -37,7 +37,9 @@ M.create_maps_to_plug = function(bufnr, mode, bindings, prefix) -- Prefix with unless this is a or :Cmd mapping if type(rhs) == "string" then if not rhs:match("[<:]") then - rhs = "" .. prefix .. rhs + rhs = "" .. prefix .. rhs .. "" + else + rhs = rhs .. "" end if mode == "i" then rhs = "" .. rhs