mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
While the display-panes indicator is on screen, make the number keys select the
pane with that index.
This commit is contained in:
parent
51c95747d8
commit
3f3b01c7ce
13
server.c
13
server.c
@ -795,6 +795,7 @@ server_accept_client(int srv_fd)
|
|||||||
void
|
void
|
||||||
server_handle_client(struct client *c)
|
server_handle_client(struct client *c)
|
||||||
{
|
{
|
||||||
|
struct window *w;
|
||||||
struct window_pane *wp;
|
struct window_pane *wp;
|
||||||
struct screen *s;
|
struct screen *s;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
@ -818,8 +819,18 @@ server_handle_client(struct client *c)
|
|||||||
|
|
||||||
if (c->session == NULL)
|
if (c->session == NULL)
|
||||||
return;
|
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);
|
status_message_clear(c);
|
||||||
server_clear_identify(c);
|
server_clear_identify(c);
|
||||||
if (c->prompt_string != NULL) {
|
if (c->prompt_string != NULL) {
|
||||||
|
5
tmux.1
5
tmux.1
@ -689,6 +689,11 @@ See the
|
|||||||
and
|
and
|
||||||
.Ic display-panes-colour
|
.Ic display-panes-colour
|
||||||
session options.
|
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
|
.It Ic down-pane Op Fl t Ar target-pane
|
||||||
.D1 (alias: Ic downp )
|
.D1 (alias: Ic downp )
|
||||||
Move down a pane.
|
Move down a pane.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user