mirror of
https://github.com/tmate-io/tmate.git
synced 2025-02-25 06:41:08 +01:00
The table could change when retrying so don't save it at start of
server_client_handle_key.
This commit is contained in:
parent
174a2ad731
commit
8c8cddbe02
@ -541,7 +541,7 @@ server_client_handle_key(struct client *c, int key)
|
|||||||
struct window *w;
|
struct window *w;
|
||||||
struct window_pane *wp;
|
struct window_pane *wp;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
struct key_table *table = c->keytable;
|
struct key_table *table;
|
||||||
struct key_binding bd_find, *bd;
|
struct key_binding bd_find, *bd;
|
||||||
int xtimeout;
|
int xtimeout;
|
||||||
|
|
||||||
@ -607,7 +607,7 @@ server_client_handle_key(struct client *c, int key)
|
|||||||
retry:
|
retry:
|
||||||
/* Try to see if there is a key binding in the current table. */
|
/* Try to see if there is a key binding in the current table. */
|
||||||
bd_find.key = key;
|
bd_find.key = key;
|
||||||
bd = RB_FIND(key_bindings, &table->key_bindings, &bd_find);
|
bd = RB_FIND(key_bindings, &c->keytable->key_bindings, &bd_find);
|
||||||
if (bd != NULL) {
|
if (bd != NULL) {
|
||||||
/*
|
/*
|
||||||
* Key was matched in this table. If currently repeating but a
|
* Key was matched in this table. If currently repeating but a
|
||||||
@ -625,6 +625,7 @@ retry:
|
|||||||
* Take a reference to this table to make sure the key binding
|
* Take a reference to this table to make sure the key binding
|
||||||
* doesn't disappear.
|
* doesn't disappear.
|
||||||
*/
|
*/
|
||||||
|
table = c->keytable;
|
||||||
table->references++;
|
table->references++;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user