aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-09-07 21:12:12 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-09-07 21:12:12 +0000
commit3f3b01c7ce503d98ab649fa4aecde741ce63cec0 (patch)
treee219aa9249b719801118cb54d4b86b16d74472f7
parent51c95747d878405bcbe2077c5c27c6b1a87c48a8 (diff)
downloadrtmux-3f3b01c7ce503d98ab649fa4aecde741ce63cec0.tar.gz
rtmux-3f3b01c7ce503d98ab649fa4aecde741ce63cec0.tar.bz2
rtmux-3f3b01c7ce503d98ab649fa4aecde741ce63cec0.zip
While the display-panes indicator is on screen, make the number keys select the
pane with that index.
-rw-r--r--server.c15
-rw-r--r--tmux.15
2 files changed, 18 insertions, 2 deletions
diff --git a/server.c b/server.c
index c8b96368..a4ef2008 100644
--- a/server.c
+++ b/server.c
@@ -795,6 +795,7 @@ server_accept_client(int srv_fd)
void
server_handle_client(struct client *c)
{
+ struct window *w;
struct window_pane *wp;
struct screen *s;
struct timeval tv;
@@ -818,8 +819,18 @@ server_handle_client(struct client *c)
if (c->session == NULL)
return;
- wp = c->session->curw->window->active; /* could die */
-
+ w = c->session->curw->window;
+ wp = w->active; /* could die */
+
+ /* Special case: number keys jump to pane in identify mode. */
+ if (c->flags & CLIENT_IDENTIFY && key >= '0' && key <= '9') {
+ wp = window_pane_at_index(w, key - '0');
+ if (wp != NULL && window_pane_visible(wp))
+ window_set_active_pane(w, wp);
+ server_clear_identify(c);
+ continue;
+ }
+
status_message_clear(c);
server_clear_identify(c);
if (c->prompt_string != NULL) {
diff --git a/tmux.1 b/tmux.1
index 757005d9..c630c179 100644
--- a/tmux.1
+++ b/tmux.1
@@ -689,6 +689,11 @@ See the
and
.Ic display-panes-colour
session options.
+While the indicator is on screen, a pane may be selected with the
+.Ql 0
+to
+.Ql 9
+keys.
.It Ic down-pane Op Fl t Ar target-pane
.D1 (alias: Ic downp )
Move down a pane.