From 7339845c01727b209b3b96e5b1d917129b2c8a83 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 7 Nov 2018 07:58:16 +0000 Subject: There is no reason wait-for has to be restricted to outside tmux. --- cmd-wait-for.c | 4 ++-- tmux.1 | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd-wait-for.c b/cmd-wait-for.c index 396548a7..33600eda 100644 --- a/cmd-wait-for.c +++ b/cmd-wait-for.c @@ -170,7 +170,7 @@ cmd_wait_for_wait(struct cmdq_item *item, const char *name, struct client *c = item->client; struct wait_item *wi; - if (c == NULL || c->session != NULL) { + if (c == NULL) { cmdq_error(item, "not able to wait"); return (CMD_RETURN_ERROR); } @@ -198,7 +198,7 @@ cmd_wait_for_lock(struct cmdq_item *item, const char *name, { struct wait_item *wi; - if (item->client == NULL || item->client->session != NULL) { + if (item->client == NULL) { cmdq_error(item, "not able to lock"); return (CMD_RETURN_ERROR); } diff --git a/tmux.1 b/tmux.1 index eb1c6807..e3409a96 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4430,8 +4430,6 @@ is used, the channel is locked and any clients that try to lock the same channel are made to wait until the channel is unlocked with .Ic wait-for .Fl U . -This command only works from outside -.Nm . .El .Sh TERMINFO EXTENSIONS .Nm -- cgit From 0c7f64458fe97f51373775bb0fed01c183bac45b Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 7 Nov 2018 08:06:28 +0000 Subject: If a non-repeating key is used when repeating, it should be treated as an entirely new key press, not checked in root table and ignored if not found. GitHub issue 1513. --- server-client.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/server-client.c b/server-client.c index aefe006e..3d939163 100644 --- a/server-client.c +++ b/server-client.c @@ -1022,6 +1022,7 @@ table_changed: } flags = c->flags; +try_again: /* Log key table. */ if (wp == NULL) log_debug("key table %s (no pane)", table->name); @@ -1030,7 +1031,6 @@ table_changed: if (c->flags & CLIENT_REPEAT) log_debug("currently repeating"); -try_again: /* Try to see if there is a key binding in the current table. */ bd = key_bindings_get(table, key0); if (bd != NULL) { @@ -1041,10 +1041,12 @@ try_again: */ if ((c->flags & CLIENT_REPEAT) && (~bd->flags & KEY_BINDING_REPEAT)) { + log_debug("found in key table %s (not repeating)", + table->name); server_client_set_key_table(c, NULL); + first = table = c->keytable; c->flags &= ~CLIENT_REPEAT; server_status_client(c); - table = c->keytable; goto table_changed; } log_debug("found in key table %s", table->name); @@ -1094,10 +1096,13 @@ try_again: log_debug("not found in key table %s", table->name); if (!server_client_is_default_key_table(c, table) || (c->flags & CLIENT_REPEAT)) { + log_debug("trying in root table"); server_client_set_key_table(c, NULL); + table = c->keytable; + if (c->flags & CLIENT_REPEAT) + first = table; c->flags &= ~CLIENT_REPEAT; server_status_client(c); - table = c->keytable; goto table_changed; } -- cgit