Check scroll-on-clear for ED also.

This commit is contained in:
nicm 2022-03-17 13:39:13 +00:00
parent 10d689e735
commit 6a1706a62f

View File

@ -1479,7 +1479,9 @@ screen_write_clearscreen(struct screen_write_ctx *ctx, u_int bg)
ttyctx.bg = bg; ttyctx.bg = bg;
/* Scroll into history if it is enabled. */ /* Scroll into history if it is enabled. */
if (s->grid->flags & GRID_HISTORY) if ((s->grid->flags & GRID_HISTORY) &&
ctx->wp != NULL &&
options_get_number(ctx->wp->options, "scroll-on-clear"))
grid_view_clear_history(s->grid, bg); grid_view_clear_history(s->grid, bg);
else else
grid_view_clear(s->grid, 0, 0, sx, sy, bg); grid_view_clear(s->grid, 0, 0, sx, sy, bg);