diff options
author | jgmdev <jgmdev@gmail.com> | 2022-05-25 10:49:34 -0400 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2022-05-25 10:49:34 -0400 |
commit | 202eddfcc91ee07ea6647b35b140244318355629 (patch) | |
tree | 4db91417be0bdfc2aad9654a2d8679db17ad7e24 | |
parent | ceb1e468667c78c3b72b7ae05a8e850633e4cb6d (diff) | |
download | lite-xl-plugins-202eddfcc91ee07ea6647b35b140244318355629.tar.gz lite-xl-plugins-202eddfcc91ee07ea6647b35b140244318355629.zip |
settings: clean previous binds on apply_kybinding()
-rw-r--r-- | plugins/settings.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/settings.lua b/plugins/settings.lua index 7846d2e..3696310 100644 --- a/plugins/settings.lua +++ b/plugins/settings.lua @@ -689,6 +689,15 @@ local function apply_keybinding(cmd, bindings, skip_save) end if #bindings > 0 then + if + not skip_save + and + settings.config.custom_keybindings + and + settings.config.custom_keybindings[cmd] + then + settings.config.custom_keybindings[cmd] = {} + end local shortcuts = "" for _, binding in ipairs(bindings) do if not binding:match("%+$") and binding ~= "" and binding ~= "none" then |