From ed786309ccc7ceb2077f658e689a5f35549bb2bc Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 7 Dec 2020 09:23:57 +0000 Subject: [PATCH 1/2] Do not clear the wrapped flag on linefeeds if it is already set - this does not appear to be what applications want. GitHub issue 2478 and 2414. --- screen-write.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/screen-write.c b/screen-write.c index ab6a020c..92f1aa39 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1240,8 +1240,6 @@ screen_write_linefeed(struct screen_write_ctx *ctx, int wrapped, u_int bg) gl = grid_get_line(gd, gd->hsize + s->cy); if (wrapped) gl->flags |= GRID_LINE_WRAPPED; - else - gl->flags &= ~GRID_LINE_WRAPPED; log_debug("%s: at %u,%u (region %u-%u)", __func__, s->cx, s->cy, s->rupper, s->rlower); From f6095cad993293ec0f1988c1f6ae22921f9d2b2e Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 7 Dec 2020 09:46:58 +0000 Subject: [PATCH 2/2] Do not include the status line size when working out the character for the pane status line. GitHub issue 2493. --- screen-redraw.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/screen-redraw.c b/screen-redraw.c index 50df2671..47c1a838 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -407,7 +407,7 @@ screen_redraw_make_pane_status(struct client *c, struct window_pane *wp, struct format_tree *ft; char *expanded; int pane_status = rctx->pane_status; - u_int width, i, cell_type, top, px, py; + u_int width, i, cell_type, px, py; struct screen_write_ctx ctx; struct screen old; @@ -432,16 +432,12 @@ screen_redraw_make_pane_status(struct client *c, struct window_pane *wp, screen_write_start(&ctx, &wp->status_screen); - if (rctx->statustop) - top = rctx->statuslines; - else - top = 0; for (i = 0; i < width; i++) { px = wp->xoff + 2 + i; if (rctx->pane_status == PANE_STATUS_TOP) - py = top + wp->yoff - 1; + py = wp->yoff - 1; else - py = top + wp->yoff + wp->sy; + py = wp->yoff + wp->sy; cell_type = screen_redraw_type_of_cell(c, px, py, pane_status); screen_redraw_border_set(wp, pane_lines, cell_type, &gc); screen_write_cell(&ctx, &gc);