diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/cmd.c | 10 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 11 |
2 files changed, 14 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c index 9cfb6862e91..d023b4eb899 100644 --- a/usr.bin/tmux/cmd.c +++ b/usr.bin/tmux/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.95 2014/07/13 20:57:46 nicm Exp $ */ +/* $OpenBSD: cmd.c,v 1.96 2014/09/25 12:45:35 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -1192,7 +1192,13 @@ cmd_find_pane(struct cmd_q *cmdq, *wpp = wl->window->active; else if (paneptr[0] == '+' || paneptr[0] == '-') *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); if (errstr != NULL) goto lookup_string; diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index e453ae54aed..3f10ee6c154 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.400 2014/09/08 14:29:05 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.401 2014/09/25 12:45:35 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> .\" @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: September 8 2014 $ +.Dd $Mdocdate: September 25 2014 $ .Dt TMUX 1 .Os .Sh NAME @@ -435,10 +435,11 @@ first attempts to use the argument as a pane index; if that fails, it is looked up as for .Ar target-window . A -.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 .Em top , .Em bottom , |