diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-12-24 12:38:57 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-12-24 12:38:57 +0000 |
commit | 854e8ae04d15c16b688ba38119656aee134548dd (patch) | |
tree | d7cec2fd3c9be238bf67b1ba769db03f66261495 /cmd.c | |
parent | 3e6d45acf67e37db3614a581ab5aaa3b9509a430 (diff) | |
download | rtmux-854e8ae04d15c16b688ba38119656aee134548dd.tar.gz rtmux-854e8ae04d15c16b688ba38119656aee134548dd.tar.bz2 rtmux-854e8ae04d15c16b688ba38119656aee134548dd.zip |
Add ^ and $ special command targets to select lowest and highest
numbered windows, from Raghavendra D Prabhu.
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |