From: nicm Date: Thu, 17 Mar 2022 13:39:13 +0000 (+0000) Subject: Check scroll-on-clear for ED also. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=08dcff4b9b07f658ce46c5569997bdcfd0df15d3;p=openbsd Check scroll-on-clear for ED also. --- diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index 367759dd52f..6339a9e5c39 100644 --- a/usr.bin/tmux/screen-write.c +++ b/usr.bin/tmux/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.206 2022/03/17 11:35:37 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.207 2022/03/17 13:39:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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);