Make key trees and some other bits static.

This commit is contained in:
nicm
2018-08-02 11:44:07 +00:00
parent f12b857415
commit 6048b0f483
6 changed files with 71 additions and 22 deletions

View File

@ -61,7 +61,7 @@ cmd_send_keys_inject(struct client *c, struct cmdq_item *item, key_code key)
struct window_pane *wp = item->target.wp;
struct session *s = item->target.s;
struct key_table *table;
struct key_binding *bd, bd_find;
struct key_binding *bd;
if (wp->mode == NULL || wp->mode->key_table == NULL) {
if (options_get_number(wp->window->options, "xterm-keys"))
@ -71,8 +71,7 @@ cmd_send_keys_inject(struct client *c, struct cmdq_item *item, key_code key)
}
table = key_bindings_get_table(wp->mode->key_table(wp), 1);
bd_find.key = (key & ~KEYC_XTERM);
bd = RB_FIND(key_bindings, &table->key_bindings, &bd_find);
bd = key_bindings_get(table, key & ~KEYC_XTERM);
if (bd != NULL) {
table->references++;
key_bindings_dispatch(bd, item, c, NULL, &item->target);