Fix key checking

This commit is contained in:
hrsh7th
2021-08-14 16:25:15 +09:00
parent 036bf1af62
commit 5cc6c61a7e

View File

@@ -53,7 +53,9 @@ keymap.feedkeys = setmetatable({
callbacks = {},
}, {
__call = function(self, keys, mode, callback)
if #keys ~= 0 then
vim.fn.feedkeys(keymap.t(keys), mode)
end
if callback then
local current_mode = string.sub(vim.api.nvim_get_mode().mode, 1, 1)
@@ -102,7 +104,7 @@ keymap.listen = setmetatable({
if existing then
break
end
if map.lhs == keys then
if keymap.t(map.lhs) == keymap.t(keys) then
existing = map
end
end
@@ -110,7 +112,7 @@ keymap.listen = setmetatable({
if existing then
break
end
if map.lhs == keys then
if keymap.t(map.lhs) == keymap.t(keys) then
existing = map
break
end