summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-find.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-04-28 12:09:24 +0000
committernicm <nicm@openbsd.org>2015-04-28 12:09:24 +0000
commita4443f9d0674d7f5c9b4c7d886c02618b46a0212 (patch)
tree86ce07c4a05101be995df3ee1d5a45dd7a328f3c /usr.bin/tmux/cmd-find.c
parentDo not do a search for the tty path if there isn't one. (diff)
downloadwireguard-openbsd-a4443f9d0674d7f5c9b4c7d886c02618b46a0212.tar.xz
wireguard-openbsd-a4443f9d0674d7f5c9b4c7d886c02618b46a0212.zip
If looking for an index, don't fill in window when given a session.
Diffstat (limited to 'usr.bin/tmux/cmd-find.c')
-rw-r--r--usr.bin/tmux/cmd-find.c10
1 files 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 <nicm@users.sourceforge.net>
@@ -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);
}