diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-02-13 16:53:14 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-02-13 16:53:14 +0000 |
commit | eb7d229bacd5ebaee58b25378243c2b6aed2b003 (patch) | |
tree | f6cc57ecbf9956b184e17a818fff92f0d143d34b /tty.c | |
parent | 1a88dbf7975c6cb28b4541e181f96ce5a19e2b2b (diff) | |
download | rtmux-eb7d229bacd5ebaee58b25378243c2b6aed2b003.tar.gz rtmux-eb7d229bacd5ebaee58b25378243c2b6aed2b003.tar.bz2 rtmux-eb7d229bacd5ebaee58b25378243c2b6aed2b003.zip |
Code tidying on my way to find tmux-in-tmux bug.
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -1,4 +1,4 @@ -/* $Id: tty.c,v 1.74 2009-02-12 00:19:31 nicm Exp $ */ +/* $Id: tty.c,v 1.75 2009-02-13 16:53:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -644,18 +644,17 @@ tty_cmd_clearendofscreen( if (tty_term_has(tty->term, TTYC_EL)) { tty_putcode(tty, TTYC_EL); if (s->old_cy != screen_size_y(s) - 1) { - tty_putc(tty, '\r'); - tty_putc(tty, '\n'); - } - for (i = s->old_cy + 1; i < screen_size_y(s); i++) { - tty_putcode(tty, TTYC_EL); - if (i != screen_size_y(s) - 1) { + tty_cursor(tty, 0, s->old_cy + 1, wp->yoff); + for (i = s->old_cy + 1; i < screen_size_y(s); i++) { + tty_putcode(tty, TTYC_EL); + if (i == screen_size_y(s) - 1) + continue; tty_emulate_repeat(tty, TTYC_CUD, TTYC_CUD1, 1); tty->cy++; } } } else { - for (i = s->old_cx; i < screen_size_y(s); i++) + for (i = s->old_cx; i < screen_size_x(s); i++) tty_putc(tty, ' '); for (j = s->old_cy; j < screen_size_y(s); j++) { for (i = 0; i < screen_size_x(s); i++) |