From a4443f9d0674d7f5c9b4c7d886c02618b46a0212 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 28 Apr 2015 12:09:24 +0000 Subject: [PATCH] If looking for an index, don't fill in window when given a session. --- usr.bin/tmux/cmd-find.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr.bin/tmux/cmd-find.c b/usr.bin/tmux/cmd-find.c index 5be7ec6c311..045f98ad8e4 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.5 2015/04/28 11:57:20 nicm Exp $ */ +/* $OpenBSD: cmd-find.c,v 1.6 2015/04/28 12:09:24 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -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) { - fs->wl = fs->s->curw; - fs->idx = fs->wl->idx; - fs->w = fs->wl->window; + if (~fs->flags & CMD_FIND_WINDOW_INDEX) { + fs->wl = fs->s->curw; + fs->w = fs->wl->window; + fs->idx = fs->wl->idx; + } return (0); } -- 2.20.1