diff options
author | 2012-12-24 12:38:57 +0000 | |
---|---|---|
committer | 2012-12-24 12:38:57 +0000 | |
commit | 1232592341beb6f56f6fbe8c0915c7e6f31f569b (patch) | |
tree | 52c818c053ef33e3a15c1f7bc62370e195481d3b /usr.bin/tmux/cmd.c | |
parent | Add -T option to select-window to toggle to last window if already (diff) | |
download | wireguard-openbsd-1232592341beb6f56f6fbe8c0915c7e6f31f569b.tar.xz wireguard-openbsd-1232592341beb6f56f6fbe8c0915c7e6f31f569b.zip |
Add ^ and $ special command targets to select lowest and highest
numbered windows, from Raghavendra D Prabhu.
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r-- | usr.bin/tmux/cmd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c index cd46d13cec2..d1f1da30cc2 100644 --- a/usr.bin/tmux/cmd.c +++ b/usr.bin/tmux/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.72 2012/11/27 09:20:03 nicm Exp $ */ +/* $OpenBSD: cmd.c,v 1.73 2012/12/24 12:38:57 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -863,6 +863,10 @@ cmd_find_window(struct cmd_ctx *ctx, const char *arg, struct session **sp) wl = s->curw; else if (winptr[0] == '!' && winptr[1] == '\0') wl = TAILQ_FIRST(&s->lastw); + else if (winptr[0] == '^' && winptr[1] == '\0') + wl = RB_MIN(winlinks, &s->windows); + else if (winptr[0] == '$' && winptr[1] == '\0') + wl = RB_MAX(winlinks, &s->windows); else if (winptr[0] == '+' || winptr[0] == '-') wl = cmd_find_window_offset(winptr, s, &ambiguous); else |