aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd.c b/cmd.c
index 79ac3386..775e1213 100644
--- a/cmd.c
+++ b/cmd.c
@@ -862,6 +862,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