diff options
author | Thomas Adam <thomas@xteddy.org> | 2020-09-08 12:01:17 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2020-09-08 12:01:17 +0100 |
commit | 3c1f34c20809c33508e4e9f47e0fc585ee55d83f (patch) | |
tree | 0be04577a763832a64bc077954698bda59d94ac1 /key-bindings.c | |
parent | 634a2bb647bc77c3679f63da3bf877d252b79b1f (diff) | |
parent | 1fed7e84a3d65c8fbfbb321b84236ccab7265d46 (diff) | |
download | rtmux-3c1f34c20809c33508e4e9f47e0fc585ee55d83f.tar.gz rtmux-3c1f34c20809c33508e4e9f47e0fc585ee55d83f.tar.bz2 rtmux-3c1f34c20809c33508e4e9f47e0fc585ee55d83f.zip |
Merge branch 'obsd-master'
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 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); |