The action can be function or table...(I want to normalize it...Hm...)
This commit is contained in:
@@ -74,7 +74,11 @@ end
|
||||
core.on_keymap = function(keys, fallback)
|
||||
for key, action in pairs(config.get().mapping) do
|
||||
if key == keys then
|
||||
return action.invoke(core, fallback)
|
||||
if type(action) == 'function' then
|
||||
return action(core, fallback)
|
||||
else
|
||||
return action.invoke(core, fallback)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user