=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-find.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/tmux/cmd-find.c 2015/04/27 22:58:58 1.3 --- src/usr.bin/tmux/cmd-find.c 2015/04/28 11:33:17 1.4 *************** *** 1,4 **** ! /* $OpenBSD: cmd-find.c,v 1.3 2015/04/27 22:58:58 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-find.c,v 1.4 2015/04/28 11:33:17 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott *************** *** 426,432 **** fs->s = fs->current->s; /* We now only need to find the winlink in this session. */ ! return (cmd_find_get_window_with_session(fs, window)); } /* --- 426,443 ---- fs->s = fs->current->s; /* We now only need to find the winlink in this session. */ ! if (cmd_find_get_window_with_session(fs, window) == 0) ! return (0); ! ! /* 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; ! return (0); ! } ! ! return (-1); } /* *************** *** 592,605 **** return (cmd_find_best_session_with_window(fs)); } ! /* Not a pane id, so use the current session and window. */ fs->s = fs->current->s; fs->wl = fs->current->wl; fs->idx = fs->current->idx; fs->w = fs->current->w; /* We now only need to find the pane in this window. */ ! return (cmd_find_get_pane_with_window(fs, pane)); } /* --- 603,625 ---- return (cmd_find_best_session_with_window(fs)); } ! /* Not a pane id, so try the current session and window. */ fs->s = fs->current->s; fs->wl = fs->current->wl; fs->idx = fs->current->idx; fs->w = fs->current->w; /* We now only need to find the pane in this window. */ ! if (cmd_find_get_pane_with_window(fs, pane) == 0) ! return (0); ! ! /* Otherwise try as a window itself (this will also try as session). */ ! if (cmd_find_get_window(fs, pane) == 0) { ! fs->wp = fs->w->active; ! return (0); ! } ! ! return (-1); } /*