summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-04-23 18:13:25 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-04-23 18:13:25 +0000
commit9e34320971ca41bd34757a8d4cb9b1f6c1e758d7 (patch)
tree81f4527d32167e33c01f118513018905c3a08e2f /usr.bin
parent0f116e93931d27e20386857a8e62557cee1c6af9 (diff)
Only use ED for clear screen if at the bottom, same as earlier fix to
clear end of screen.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/tty.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 31fab6faf65..decb7617818 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.266 2017/04/19 06:52:27 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.267 2017/04/23 18:13:24 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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);