1
0
mirror of https://github.com/tmux/tmux.git synced 2025-04-10 11:08:49 +00:00

Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2020-05-20 10:01:19 +01:00
commit 5ac5cd995e
2 changed files with 3 additions and 3 deletions

View File

@ -197,7 +197,7 @@ key_bindings_add(const char *name, key_code key, const char *note, int repeat,
} }
bd = xcalloc(1, sizeof *bd); bd = xcalloc(1, sizeof *bd);
bd->key = key; bd->key = (key & ~KEYC_MASK_FLAGS);
if (note != NULL) if (note != NULL)
bd->note = xstrdup(note); bd->note = xstrdup(note);
RB_INSERT(key_bindings, &table->key_bindings, bd); RB_INSERT(key_bindings, &table->key_bindings, bd);

View File

@ -339,7 +339,7 @@ key_string_lookup_key(key_code key, int with_flags)
/* Try the key against the string table. */ /* Try the key against the string table. */
for (i = 0; i < nitems(key_string_table); i++) { for (i = 0; i < nitems(key_string_table); i++) {
if (key == key_string_table[i].key) if (key == (key_string_table[i].key & KEYC_MASK_KEY))
break; break;
} }
if (i != nitems(key_string_table)) { if (i != nitems(key_string_table)) {
@ -359,7 +359,7 @@ key_string_lookup_key(key_code key, int with_flags)
/* Invalid keys are errors. */ /* Invalid keys are errors. */
if (key > 255) { if (key > 255) {
snprintf(out, sizeof out, "Invalid#%llx", key); snprintf(out, sizeof out, "Invalid#%llx", saved);
goto out; goto out;
} }