aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-02-13 17:09:55 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-02-13 17:09:55 +0000
commitfdafe630049861c7d6f293bc34064182d8f326f8 (patch)
tree47194f3865c1729d677342cd60f1f58fd13ce9b6 /tty.c
parenteb7d229bacd5ebaee58b25378243c2b6aed2b003 (diff)
downloadrtmux-fdafe630049861c7d6f293bc34064182d8f326f8.tar.gz
rtmux-fdafe630049861c7d6f293bc34064182d8f326f8.tar.bz2
rtmux-fdafe630049861c7d6f293bc34064182d8f326f8.zip
Reset region before using CUD etc.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tty.c b/tty.c
index ab0f9321..3ae1b74a 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.75 2009-02-13 16:53:14 nicm Exp $ */
+/* $Id: tty.c,v 1.76 2009-02-13 17:09:55 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -641,6 +641,7 @@ tty_cmd_clearendofscreen(
tty_reset(tty);
tty_cursor(tty, s->old_cx, s->old_cy, wp->yoff);
+ tty_region(tty, 0, screen_size_y(s) - 1, wp->yoff);
if (tty_term_has(tty->term, TTYC_EL)) {
tty_putcode(tty, TTYC_EL);
if (s->old_cy != screen_size_y(s) - 1) {
@@ -673,6 +674,7 @@ tty_cmd_clearstartofscreen(
tty_reset(tty);
tty_cursor(tty, 0, 0, wp->yoff);
+ tty_region(tty, 0, screen_size_y(s) - 1, wp->yoff);
if (tty_term_has(tty->term, TTYC_EL)) {
for (i = 0; i < s->old_cy; i++) {
tty_putcode(tty, TTYC_EL);
@@ -699,6 +701,7 @@ tty_cmd_clearscreen(
tty_reset(tty);
tty_cursor(tty, 0, 0, wp->yoff);
+ tty_region(tty, 0, screen_size_y(s) - 1, wp->yoff);
if (tty_term_has(tty->term, TTYC_EL)) {
for (i = 0; i < screen_size_y(s); i++) {
tty_putcode(tty, TTYC_EL);