Improve API stability

This commit is contained in:
hrsh7th
2021-08-24 22:43:02 +09:00
parent cbb80af6dd
commit c0fcdd9c61
5 changed files with 165 additions and 119 deletions

View File

@@ -75,10 +75,11 @@ core.on_keymap = function(keys, fallback)
for key, action in pairs(config.get().mapping) do
if key == keys then
if type(action) == 'function' then
return action(core, fallback)
action(fallback)
else
return action.invoke(core, fallback)
action.invoke(fallback)
end
return
end
end