summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-find.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-03-12 13:14:05 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-03-12 13:14:05 +0000
commit95ad2ab106e5b9cccb5b8907b88f4aacccfab9b0 (patch)
treec6709c2a73153e484fc0a04368b0490aeda501c5 /usr.bin/tmux/cmd-find.c
parent2832d1b0ecbbd99328d4dd4dd684b99258952567 (diff)
When asked for a window index, return it even if the window exists.
Diffstat (limited to 'usr.bin/tmux/cmd-find.c')
-rw-r--r--usr.bin/tmux/cmd-find.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-find.c b/usr.bin/tmux/cmd-find.c
index 7702ef9e64f..d95c6dcc241 100644
--- a/usr.bin/tmux/cmd-find.c
+++ b/usr.bin/tmux/cmd-find.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-find.c,v 1.69 2019/03/12 12:49:46 nicm Exp $ */
+/* $OpenBSD: cmd-find.c,v 1.70 2019/03/12 13:14:04 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -454,6 +454,7 @@ cmd_find_get_window_with_session(struct cmd_find_state *fs, const char *window)
if (errstr == NULL) {
fs->wl = winlink_find_by_index(&fs->s->windows, idx);
if (fs->wl != NULL) {
+ fs->idx = fs->wl->idx;
fs->w = fs->wl->window;
return (0);
}