aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-03-18 01:36:49 +0000
committerTiago Cunha <tcunha@gmx.com>2012-03-18 01:36:49 +0000
commit14d6a4ab26b8d0c2d2262a688e9ce275d7e66814 (patch)
tree431e2b91e5d49bc24cf67738a65a03ac8d121433 /tty.c
parente678ba39437460a07afb2cbf8ce3b79e12bd475d (diff)
downloadrtmux-14d6a4ab26b8d0c2d2262a688e9ce275d7e66814.tar.gz
rtmux-14d6a4ab26b8d0c2d2262a688e9ce275d7e66814.tar.bz2
rtmux-14d6a4ab26b8d0c2d2262a688e9ce275d7e66814.zip
Sync OpenBSD patchset 1047:
Use EL to clear to end of line if possible.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tty.c b/tty.c
index c2b75cc8..1ccf5751 100644
--- a/tty.c
+++ b/tty.c
@@ -588,7 +588,8 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int py, u_int ox, u_int oy)
tty_reset(tty);
tty_cursor(tty, ox + sx, oy + py);
- if (screen_size_x(s) >= tty->sx && tty_term_has(tty->term, TTYC_EL))
+ if (ox + sx + screen_size_x(s) >= tty->sx &&
+ tty_term_has(tty->term, TTYC_EL))
tty_putcode(tty, TTYC_EL);
else {
for (i = sx; i < screen_size_x(s); i++)