mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Cancel key table when switching session, unless the key is going to
repeat. Reported by Amos Bird.
This commit is contained in:
@ -400,8 +400,9 @@ void
|
||||
key_bindings_dispatch(struct key_binding *bd, struct client *c,
|
||||
struct mouse_event *m, struct cmd_find_state *fs)
|
||||
{
|
||||
struct cmd *cmd;
|
||||
int readonly;
|
||||
struct cmd *cmd;
|
||||
struct cmdq_item *item;
|
||||
int readonly;
|
||||
|
||||
readonly = 1;
|
||||
TAILQ_FOREACH(cmd, &bd->cmdlist->list, qentry) {
|
||||
@ -410,6 +411,9 @@ key_bindings_dispatch(struct key_binding *bd, struct client *c,
|
||||
}
|
||||
if (!readonly && (c->flags & CLIENT_READONLY))
|
||||
cmdq_append(c, cmdq_get_callback(key_bindings_read_only, NULL));
|
||||
else
|
||||
cmdq_append(c, cmdq_get_command(bd->cmdlist, fs, m, 0));
|
||||
else {
|
||||
item = cmdq_get_command(bd->cmdlist, fs, m, 0);
|
||||
item->repeat = bd->can_repeat;
|
||||
cmdq_append(c, item);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user