=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window.c,v retrieving revision 1.174 retrieving revision 1.175 diff -c -r1.174 -r1.175 *** src/usr.bin/tmux/window.c 2016/10/19 09:22:07 1.174 --- src/usr.bin/tmux/window.c 2016/11/16 00:24:03 1.175 *************** *** 1,4 **** ! /* $OpenBSD: window.c,v 1.174 2016/10/19 09:22:07 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: window.c,v 1.175 2016/11/16 00:24:03 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 1185,1201 **** } int ! window_pane_visible(struct window_pane *wp) { struct window *w = wp->window; - if (wp->layout_cell == NULL) - return (0); if (wp->xoff >= w->sx || wp->yoff >= w->sy) ! return (0); if (wp->xoff + wp->sx > w->sx || wp->yoff + wp->sy > w->sy) return (0); ! return (1); } char * --- 1185,1207 ---- } int ! window_pane_outside(struct window_pane *wp) { struct window *w = wp->window; if (wp->xoff >= w->sx || wp->yoff >= w->sy) ! return (1); if (wp->xoff + wp->sx > w->sx || wp->yoff + wp->sy > w->sy) + return (1); + return (0); + } + + int + window_pane_visible(struct window_pane *wp) + { + if (wp->layout_cell == NULL) return (0); ! return (!window_pane_outside(wp)); } char *