From bef70132ac23e5d13fd6db3d3f5f8ebdf486c1f3 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 14 May 2020 16:53:04 +0100 Subject: [PATCH] Check if outside the window before checking if on the border so that cells that are outside in one direction but not the other are not given the wrong type. --- screen-redraw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/screen-redraw.c b/screen-redraw.c index 3fa537a4..ae9d8a90 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -212,14 +212,14 @@ screen_redraw_cell_border(struct client *c, u_int px, u_int py, int pane_status) struct window *w = c->session->curw->window; struct window_pane *wp; - /* On the window border? */ - if (px == w->sx || py == w->sy) - return (1); - /* Outside the window? */ if (px > w->sx || py > w->sy) return (0); + /* On the window border? */ + if (px == w->sx || py == w->sy) + return (1); + /* Check all the panes. */ TAILQ_FOREACH(wp, &w->panes, entry) { if (!window_pane_visible(wp))