mirror of
https://github.com/tmux/tmux.git
synced 2025-01-15 05:09:04 +00:00
Support ! for last pane.
This commit is contained in:
parent
21062d74d5
commit
304f86cdbb
8
cmd.c
8
cmd.c
@ -1192,7 +1192,13 @@ cmd_find_pane(struct cmd_q *cmdq,
|
|||||||
*wpp = wl->window->active;
|
*wpp = wl->window->active;
|
||||||
else if (paneptr[0] == '+' || paneptr[0] == '-')
|
else if (paneptr[0] == '+' || paneptr[0] == '-')
|
||||||
*wpp = cmd_find_pane_offset(paneptr, wl);
|
*wpp = cmd_find_pane_offset(paneptr, wl);
|
||||||
else {
|
else if (paneptr[0] == '!' && paneptr[1] == '\0') {
|
||||||
|
if (wl->window->last == NULL) {
|
||||||
|
cmdq_error(cmdq, "no last pane");
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
*wpp = wl->window->last;
|
||||||
|
} else {
|
||||||
idx = strtonum(paneptr, 0, INT_MAX, &errstr);
|
idx = strtonum(paneptr, 0, INT_MAX, &errstr);
|
||||||
if (errstr != NULL)
|
if (errstr != NULL)
|
||||||
goto lookup_string;
|
goto lookup_string;
|
||||||
|
7
tmux.1
7
tmux.1
@ -435,10 +435,11 @@ first attempts to use the argument as a pane index; if that fails, it is looked
|
|||||||
up as for
|
up as for
|
||||||
.Ar target-window .
|
.Ar target-window .
|
||||||
A
|
A
|
||||||
.Ql +
|
.Ql + ,
|
||||||
or
|
|
||||||
.Ql -
|
.Ql -
|
||||||
indicate the next or previous pane index, respectively.
|
or
|
||||||
|
.Ql \&!
|
||||||
|
indicate the next, previous or last pane.
|
||||||
One of the strings
|
One of the strings
|
||||||
.Em top ,
|
.Em top ,
|
||||||
.Em bottom ,
|
.Em bottom ,
|
||||||
|
Loading…
Reference in New Issue
Block a user