diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-03-12 12:38:43 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-03-12 12:38:43 +0000 |
commit | d5c877cf33351b09b947f41cc534e7bb4de754c2 (patch) | |
tree | 1f69ec7aa2b3a69c3e1316a88bbfffcaa04b3cbb | |
parent | 5677545d80155bf4ed1ceddbf2ad94997708f950 (diff) |
Use EL to clear to end of line if possible.
-rw-r--r-- | usr.bin/tmux/tty.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index fcefcbb6f4d..bb0900ea254 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.116 2012/03/09 21:42:13 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.117 2012/03/12 12:38:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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++) |