From f8ff1e94c02ab96c1805b51ff7c8fc95d31a93d0 Mon Sep 17 00:00:00 2001 From: Alessandro Ceserani Date: Sat, 26 Nov 2022 22:15:45 -0600 Subject: [PATCH] remaps fix: ignore str representations of lua funcs --- lua/delaytrain/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/delaytrain/init.lua b/lua/delaytrain/init.lua index 8e16eca..8f78a37 100644 --- a/lua/delaytrain/init.lua +++ b/lua/delaytrain/init.lua @@ -85,11 +85,11 @@ function M.enable() for _, key in ipairs(keys) do -- Check that keys haven't been remapped (e.g. hjkl to dtrn) local keypress = "" - local remapped = vim.fn.maparg(key, mode_array[1]) - if remapped == "" then - keypress = key - else + local remapped = vim.fn.maparg(key, mode_array[1], false, true).rhs + if remapped then keypress = remapped + else + keypress = key end -- Set the current grace period for the given key current_grace_period_intervals[key] = 0