"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "key-bindings.c" between
tmux-3.2.tar.gz and tmux-3.2a.tar.gz

About: tmux is a terminal multiplexer that lets you switch easily between several programs in one terminal.

key-bindings.c  (tmux-3.2):key-bindings.c  (tmux-3.2a)
skipping to change at line 218 skipping to change at line 218
bd = xcalloc(1, sizeof *bd); bd = xcalloc(1, sizeof *bd);
bd->key = (key & ~KEYC_MASK_FLAGS); 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);
if (repeat) if (repeat)
bd->flags |= KEY_BINDING_REPEAT; bd->flags |= KEY_BINDING_REPEAT;
bd->cmdlist = cmdlist; bd->cmdlist = cmdlist;
log_debug("%s: %#llx %s = %s", __func__, bd->key,
key_string_lookup_key(bd->key, 1), cmd_list_print(bd->cmdlist, 0));
} }
void void
key_bindings_remove(const char *name, key_code key) key_bindings_remove(const char *name, key_code key)
{ {
struct key_table *table; struct key_table *table;
struct key_binding *bd; struct key_binding *bd;
table = key_bindings_get_table(name, 0); table = key_bindings_get_table(name, 0);
if (table == NULL) if (table == NULL)
return; return;
bd = key_bindings_get(table, key & ~KEYC_MASK_FLAGS); bd = key_bindings_get(table, key & ~KEYC_MASK_FLAGS);
if (bd == NULL) if (bd == NULL)
return; return;
log_debug("%s: %#llx %s", __func__, bd->key,
key_string_lookup_key(bd->key, 1));
RB_REMOVE(key_bindings, &table->key_bindings, bd); RB_REMOVE(key_bindings, &table->key_bindings, bd);
key_bindings_free(bd); key_bindings_free(bd);
if (RB_EMPTY(&table->key_bindings) && if (RB_EMPTY(&table->key_bindings) &&
RB_EMPTY(&table->default_key_bindings)) { RB_EMPTY(&table->default_key_bindings)) {
RB_REMOVE(key_tables, &key_tables, table); RB_REMOVE(key_tables, &key_tables, table);
key_bindings_unref_table(table); key_bindings_unref_table(table);
} }
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)