diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-11-03 08:35:52 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-11-03 08:35:52 +0000 |
commit | ba9962b568dd111455963c88b0458cf8847c9690 (patch) | |
tree | a13a66498befbd75237a3a7a3869ccd2c52b8452 /key-bindings.c | |
parent | 733abfcfc5b05cb3e1f2cf08f00a9325c6f6fa04 (diff) | |
parent | ff53eed402abb146096673963da39b5036a5c861 (diff) | |
download | rtmux-ba9962b568dd111455963c88b0458cf8847c9690.tar.gz rtmux-ba9962b568dd111455963c88b0458cf8847c9690.tar.bz2 rtmux-ba9962b568dd111455963c88b0458cf8847c9690.zip |
Merge branch 'master' into 3.2-rc
Diffstat (limited to 'key-bindings.c')
-rw-r--r-- | key-bindings.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/key-bindings.c b/key-bindings.c index 4c4d4ba5..b47f6ff7 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); |