summaryrefslogtreecommitdiffstats
path: root/tty.c
diff options
context:
space:
mode:
authornicm <nicm>2017-04-23 18:13:24 +0000
committernicm <nicm>2017-04-23 18:13:24 +0000
commit51720146680d8fdba021dae755fc50305c9a0206 (patch)
tree31363581a09ed1abe8961546cd8a45ca5fb5152a /tty.c
parent1e0eb914d945e0f287716d56669d0de409e86e59 (diff)
Only use ED for clear screen if at the bottom, same as earlier fix to
clear end of screen.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tty.c b/tty.c
index 362cd36c..412cac69 100644
--- a/tty.c
+++ b/tty.c
@@ -1218,6 +1218,7 @@ tty_cmd_clearscreen(struct tty *tty, const struct tty_ctx *ctx)
tty_margin_off(tty);
if (tty_pane_full_width(tty, ctx) &&
+ ctx->yoff + wp->sy >= tty->sy - 1 &&
status_at_line(tty->client) <= 0 &&
tty_term_has(tty->term, TTYC_ED)) {
tty_cursor_pane(tty, ctx, 0, 0);