1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

If looking for an index, don't fill in window when given a session.

This commit is contained in:
nicm 2015-04-28 12:09:24 +00:00
parent 14d8cd6445
commit e36fab2f70

View File

@ -434,9 +434,11 @@ cmd_find_get_window(struct cmd_find_state *fs, const char *window)
/* Otherwise try as a session itself. */
if (cmd_find_get_session(fs, window) == 0) {
if (~fs->flags & CMD_FIND_WINDOW_INDEX) {
fs->wl = fs->s->curw;
fs->idx = fs->wl->idx;
fs->w = fs->wl->window;
fs->idx = fs->wl->idx;
}
return (0);
}