mirror of
https://github.com/tmux/tmux.git
synced 2024-12-24 01:58:46 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
f8b3f1622d
@ -73,7 +73,7 @@ cmd_send_keys_inject(struct client *c, struct cmdq_item *item, key_code key)
|
||||
bd = RB_FIND(key_bindings, &table->key_bindings, &bd_find);
|
||||
if (bd != NULL) {
|
||||
table->references++;
|
||||
key_bindings_dispatch(bd, c, NULL, &item->target);
|
||||
key_bindings_dispatch(bd, item, c, NULL, &item->target);
|
||||
key_bindings_unref_table(table);
|
||||
}
|
||||
}
|
||||
|
@ -400,11 +400,11 @@ key_bindings_read_only(struct cmdq_item *item, __unused void *data)
|
||||
}
|
||||
|
||||
void
|
||||
key_bindings_dispatch(struct key_binding *bd, struct client *c,
|
||||
struct mouse_event *m, struct cmd_find_state *fs)
|
||||
key_bindings_dispatch(struct key_binding *bd, struct cmdq_item *item,
|
||||
struct client *c, struct mouse_event *m, struct cmd_find_state *fs)
|
||||
{
|
||||
struct cmd *cmd;
|
||||
struct cmdq_item *item;
|
||||
struct cmdq_item *new_item;
|
||||
int readonly;
|
||||
|
||||
readonly = 1;
|
||||
@ -413,11 +413,14 @@ key_bindings_dispatch(struct key_binding *bd, struct client *c,
|
||||
readonly = 0;
|
||||
}
|
||||
if (!readonly && (c->flags & CLIENT_READONLY))
|
||||
cmdq_append(c, cmdq_get_callback(key_bindings_read_only, NULL));
|
||||
new_item = cmdq_get_callback(key_bindings_read_only, NULL);
|
||||
else {
|
||||
item = cmdq_get_command(bd->cmdlist, fs, m, 0);
|
||||
new_item = cmdq_get_command(bd->cmdlist, fs, m, 0);
|
||||
if (bd->flags & KEY_BINDING_REPEAT)
|
||||
item->shared->flags |= CMDQ_SHARED_REPEAT;
|
||||
cmdq_append(c, item);
|
||||
new_item->shared->flags |= CMDQ_SHARED_REPEAT;
|
||||
}
|
||||
if (item != NULL)
|
||||
cmdq_insert_after(item, new_item);
|
||||
else
|
||||
cmdq_append(c, new_item);
|
||||
}
|
||||
|
@ -945,7 +945,7 @@ retry:
|
||||
server_status_client(c);
|
||||
|
||||
/* Execute the key binding. */
|
||||
key_bindings_dispatch(bd, c, m, &fs);
|
||||
key_bindings_dispatch(bd, NULL, c, m, &fs);
|
||||
key_bindings_unref_table(table);
|
||||
return;
|
||||
}
|
||||
|
4
tmux.h
4
tmux.h
@ -1805,8 +1805,8 @@ void key_bindings_add(const char *, key_code, int, struct cmd_list *);
|
||||
void key_bindings_remove(const char *, key_code);
|
||||
void key_bindings_remove_table(const char *);
|
||||
void key_bindings_init(void);
|
||||
void key_bindings_dispatch(struct key_binding *, struct client *,
|
||||
struct mouse_event *, struct cmd_find_state *);
|
||||
void key_bindings_dispatch(struct key_binding *, struct cmdq_item *,
|
||||
struct client *, struct mouse_event *, struct cmd_find_state *);
|
||||
|
||||
/* key-string.c */
|
||||
key_code key_string_lookup_string(const char *);
|
||||
|
Loading…
Reference in New Issue
Block a user