aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-04-16 22:01:19 +0100
committerThomas Adam <thomas@xteddy.org>2017-04-16 22:01:19 +0100
commitd912687be76891cdf5d124d278bf42b0bebd3106 (patch)
tree6b7bfcddd7f754408007a3406e7ddca86ec70cdf /tty.c
parent9583878a7b31a37cfaca9a39d3884c06da7d1ae1 (diff)
parentd566c780e54010112d499707cd80a594144d1a89 (diff)
downloadrtmux-d912687be76891cdf5d124d278bf42b0bebd3106.tar.gz
rtmux-d912687be76891cdf5d124d278bf42b0bebd3106.tar.bz2
rtmux-d912687be76891cdf5d124d278bf42b0bebd3106.zip
Merge branch 'obsd-master'
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index 04a673fc..29211be8 100644
--- a/tty.c
+++ b/tty.c
@@ -693,10 +693,11 @@ tty_draw_line(struct tty *tty, const struct window_pane *wp,
{
struct grid_cell gc, last;
u_int i, j, sx, width;
- int flags = (tty->flags & TTY_NOCURSOR);
+ int flags, cleared = 0;
char buf[512];
size_t len;
+ flags = (tty->flags & TTY_NOCURSOR);
tty->flags |= TTY_NOCURSOR;
tty_update_mode(tty, tty->mode, s);
@@ -709,6 +710,16 @@ tty_draw_line(struct tty *tty, const struct window_pane *wp,
if (sx > tty->sx)
sx = tty->sx;
+ if (screen_size_x(s) < tty->sx &&
+ ox == 0 &&
+ sx != screen_size_x(s) &&
+ tty_term_has(tty->term, TTYC_EL1) &&
+ !tty_fake_bce(tty, wp, 8)) {
+ tty_default_attributes(tty, wp, 8);
+ tty_cursor(tty, screen_size_x(s) - 1, oy + py);
+ tty_putcode(tty, TTYC_EL1);
+ cleared = 1;
+ }
tty_cursor(tty, ox, oy + py);
memcpy(&last, &grid_default_cell, sizeof last);
@@ -763,7 +774,7 @@ tty_draw_line(struct tty *tty, const struct window_pane *wp,
tty_putn(tty, buf, len, width);
}
- if (sx < tty->sx) {
+ if (!cleared && sx < tty->sx) {
tty_default_attributes(tty, wp, 8);
tty_cursor(tty, ox + sx, oy + py);