diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-06-26 18:28:32 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-06-26 18:28:32 +0000 |
commit | b1d221773d10e8c9add83a5537b888399ccbb412 (patch) | |
tree | 378e96677669f9d5902420ec2835d66edcaa69b9 /usr.bin | |
parent | 3de7eca78f5f74d3019ccc08ad9eda1689fe3cd1 (diff) |
Pass keys that aren't 0-9 on to normal key processing when display-panes
is active (restores previous behaviour).
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/cmd-display-panes.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/server-client.c | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-display-panes.c b/usr.bin/tmux/cmd-display-panes.c index ddaab2df4ef..68471669f10 100644 --- a/usr.bin/tmux/cmd-display-panes.c +++ b/usr.bin/tmux/cmd-display-panes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-display-panes.c,v 1.28 2019/06/18 11:08:42 nicm Exp $ */ +/* $OpenBSD: cmd-display-panes.c,v 1.29 2019/06/26 18:28:31 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -204,7 +204,7 @@ cmd_display_panes_key(struct client *c, struct key_event *event) struct cmd_parse_result *pr; if (event->key < '0' || event->key > '9') - return (1); + return (-1); wp = window_pane_at_index(w, event->key - '0'); if (wp == NULL) diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 09f022902a4..aaac84fd242 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.289 2019/06/20 19:29:38 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.290 2019/06/26 18:28:31 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1220,9 +1220,13 @@ server_client_handle_key(struct client *c, struct key_event *event) * blocked so they need to be processed immediately rather than queued. */ if ((~c->flags & CLIENT_READONLY) && c->overlay_key != NULL) { - if (c->overlay_key(c, event) != 0) + switch (c->overlay_key(c, event)) { + case 0: + return (0); + case 1: server_client_clear_overlay(c); - return (0); + return (0); + } } /* |