From e80f8994804e5a1b2e53a5ae589b9a9cee00e3c5 Mon Sep 17 00:00:00 2001 From: Dmitry Maluka Date: Wed, 6 Jan 2021 01:37:49 +0100 Subject: [PATCH] Fix non-working TryBindKey and UnbindKey (#1970) Fixed regression: since merging keybindings branch, TryBindKey and UnbindKey and accordingly "bind" and "unbind" commands don't work (fail to unmarshal bindings.json). This is just a quick fixup to make TryBindKey and UnbindKey work again. They still work with "buffer" bindings only. --- internal/action/bindings.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/action/bindings.go b/internal/action/bindings.go index 76f29e3b..e0fe0b8a 100644 --- a/internal/action/bindings.go +++ b/internal/action/bindings.go @@ -238,7 +238,7 @@ func findEvent(k string) (Event, error) { // Returns true if the keybinding already existed and a possible error func TryBindKey(k, v string, overwrite bool) (bool, error) { var e error - var parsed map[string]string + var parsed map[string]interface{} filename := filepath.Join(config.ConfigDir, "bindings.json") createBindingsIfNotExist(filename) @@ -288,7 +288,7 @@ func TryBindKey(k, v string, overwrite bool) (bool, error) { // UnbindKey removes the binding for a key from the bindings.json file func UnbindKey(k string) error { var e error - var parsed map[string]string + var parsed map[string]interface{} filename := filepath.Join(config.ConfigDir, "bindings.json") createBindingsIfNotExist(filename)