When asked for a window index, return it even if the window exists.

This commit is contained in:
nicm 2019-03-12 13:14:04 +00:00
parent 7804fa1b82
commit 3f0efc050a

View File

@ -454,6 +454,7 @@ cmd_find_get_window_with_session(struct cmd_find_state *fs, const char *window)
if (errstr == NULL) { if (errstr == NULL) {
fs->wl = winlink_find_by_index(&fs->s->windows, idx); fs->wl = winlink_find_by_index(&fs->s->windows, idx);
if (fs->wl != NULL) { if (fs->wl != NULL) {
fs->idx = fs->wl->idx;
fs->w = fs->wl->window; fs->w = fs->wl->window;
return (0); return (0);
} }