From 1fed7e84a3d65c8fbfbb321b84236ccab7265d46 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 8 Sep 2020 10:19:19 +0000 Subject: Allow -N without a command to change or add a note to an existing key. --- key-bindings.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'key-bindings.c') diff --git a/key-bindings.c b/key-bindings.c index f11bb430..63d4bb26 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -191,6 +191,16 @@ key_bindings_add(const char *name, key_code key, const char *note, int repeat, table = key_bindings_get_table(name, 1); bd = key_bindings_get(table, key & ~KEYC_MASK_FLAGS); + if (cmdlist == NULL) { + if (bd != NULL) { + free((void *)bd->note); + if (note != NULL) + bd->note = xstrdup(note); + else + bd->note = NULL; + } + return; + } if (bd != NULL) { RB_REMOVE(key_bindings, &table->key_bindings, bd); key_bindings_free(bd); -- cgit From 4c8706d39977ca1f12b8980bcc168e0a24a3d0f7 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 13 Oct 2020 10:15:23 +0000 Subject: Fix note for "previous-window" default key binding, from Sebastian Falbesoner. --- key-bindings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'key-bindings.c') diff --git a/key-bindings.c b/key-bindings.c index 63d4bb26..b47f6ff7 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -380,7 +380,7 @@ key_bindings_init(void) "bind -N 'Select the next window' n next-window", "bind -N 'Select the next pane' o select-pane -t:.+", "bind -N 'Customize options' C customize-mode -Z", - "bind -N 'Select the previous pane' p previous-window", + "bind -N 'Select the previous window' p previous-window", "bind -N 'Display pane numbers' q display-panes", "bind -N 'Redraw the current client' r refresh-client", "bind -N 'Choose a session from a list' s choose-tree -Zs", -- cgit