aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2022-03-17 13:39:13 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2022-04-06 14:19:51 +0100
commit60a0a904e007390b8fba484eea9461bf095bff7a (patch)
tree80b4527cb4719aa4f13283e352fe2d247bfad3ef
parentc0508c9321d2bd3b94a850d953db9532854b45cd (diff)
downloadrtmux-60a0a904e007390b8fba484eea9461bf095bff7a.tar.gz
rtmux-60a0a904e007390b8fba484eea9461bf095bff7a.tar.bz2
rtmux-60a0a904e007390b8fba484eea9461bf095bff7a.zip
Check scroll-on-clear for ED also.
-rw-r--r--screen-write.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/screen-write.c b/screen-write.c
index aa898f78..6b6a750e 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -1479,7 +1479,9 @@ screen_write_clearscreen(struct screen_write_ctx *ctx, u_int bg)
ttyctx.bg = bg;
/* 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);
else
grid_view_clear(s->grid, 0, 0, sx, sy, bg);