diff --git a/screen-redraw.c b/screen-redraw.c index a00d0fc3..0a343f69 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -1498,13 +1498,13 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx, } for (j = jmin; j < jmax; j++) { - wy = sb_y + j; /* window y coordinate */ - py = sb_tty_y + j;/* tty y coordinate */ + wy = sb_y + j; /* window y coordinate */ + py = sb_tty_y + j; /* tty y coordinate */ r = tty_check_overlay_range(tty, sb_x, wy, imax); r = screen_redraw_get_visible_ranges(wp, sb_x, wy, imax, r); for (i = imin; i < imax; i++) { px = sb_x + ox + i; /* tty x coordinate */ - wx = sb_x + i; /* window x coordinate */ + wx = sb_x + i; /* window x coordinate */ if (wx < xoff - (int)sb_w - (int)sb_pad || px >= sx || px < 0 || wy < yoff - 1 || diff --git a/tty.c b/tty.c index d05eab78..157efbcf 100644 --- a/tty.c +++ b/tty.c @@ -1394,17 +1394,8 @@ tty_clear_area(struct tty *tty, const struct tty_ctx *ctx, u_int py, } /* Couldn't use an escape sequence, loop over the lines. */ - if (c->session->statusat == 0) - oy = c->session->statuslines; - for (yy = py; yy < py + ny; yy++) { - r = tty_check_overlay_range(tty, px, yy - oy, nx); - for (i = 0; i < r->used; i++) { - ri = &r->ranges[i]; - if (ri->nx == 0) - continue; - tty_clear_line(tty, defaults, yy, ri->px, ri->nx, bg); - } - } + for (yy = py; yy < py + ny; yy++) + tty_clear_line(tty, defaults, yy, px, nx, bg); } /* Clear an area in a pane. */