From 202eddfcc91ee07ea6647b35b140244318355629 Mon Sep 17 00:00:00 2001 From: jgmdev Date: Wed, 25 May 2022 10:49:34 -0400 Subject: settings: clean previous binds on apply_kybinding() --- plugins/settings.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'plugins') 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 -- cgit v1.2.3