=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window.c,v retrieving revision 1.186 retrieving revision 1.187 diff -u -r1.186 -r1.187 --- src/usr.bin/tmux/window.c 2017/03/13 17:20:11 1.186 +++ src/usr.bin/tmux/window.c 2017/03/21 09:49:10 1.187 @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.186 2017/03/13 17:20:11 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.187 2017/03/21 09:49:10 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1257,7 +1257,7 @@ { struct screen *s = &wp->base; char *newsearchstr, *line, *msg; - u_int i; + u_int i; msg = NULL; xasprintf(&newsearchstr, "*%s*", searchstr); @@ -1305,17 +1305,18 @@ { struct window_pane *next, *best, **list; u_int edge, left, right, end, size; - int found; + int status, found; if (wp == NULL || !window_pane_visible(wp)) return (NULL); + status = options_get_number(wp->window->options, "pane-border-status"); list = NULL; size = 0; edge = wp->yoff; - if (edge == 0) - edge = wp->window->sy + 1; + if (edge == (status == 1 ? 1 : 0)) + edge = wp->window->sy + 1 - (status == 2 ? 1 : 0); left = wp->xoff; right = wp->xoff + wp->sx; @@ -1351,17 +1352,18 @@ { struct window_pane *next, *best, **list; u_int edge, left, right, end, size; - int found; + int status, found; if (wp == NULL || !window_pane_visible(wp)) return (NULL); + status = options_get_number(wp->window->options, "pane-border-status"); list = NULL; size = 0; edge = wp->yoff + wp->sy + 1; - if (edge >= wp->window->sy) - edge = 0; + if (edge >= wp->window->sy - (status == 2 ? 1 : 0)) + edge = (status == 1 ? 1 : 0); left = wp->xoff; right = wp->xoff + wp->sx;