aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authornicm <nicm>2017-04-17 08:10:44 +0000
committernicm <nicm>2017-04-17 08:10:44 +0000
commit175d1854d4b5886c5ad8a77c153ced2b8f15621a (patch)
treee35c89e45ec71cba71985780345ed21a7b658164 /tty.c
parent7461c165b5a802c70b7ac460efa0942ec6acf285 (diff)
downloadrtmux-175d1854d4b5886c5ad8a77c153ced2b8f15621a.tar.gz
rtmux-175d1854d4b5886c5ad8a77c153ced2b8f15621a.tar.bz2
rtmux-175d1854d4b5886c5ad8a77c153ced2b8f15621a.zip
Don't bother moving the cursor for empty lines.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index 04c98e9e..43ea1749 100644
--- a/tty.c
+++ b/tty.c
@@ -720,7 +720,8 @@ tty_draw_line(struct tty *tty, const struct window_pane *wp,
tty_putcode(tty, TTYC_EL1);
cleared = 1;
}
- tty_cursor(tty, ox, oy + py);
+ if (sx != 0)
+ tty_cursor(tty, ox, oy + py);
memcpy(&last, &grid_default_cell, sizeof last);
len = 0;
@@ -776,7 +777,6 @@ tty_draw_line(struct tty *tty, const struct window_pane *wp,
if (!cleared && sx < tty->sx) {
tty_default_attributes(tty, wp, 8);
-
tty_cursor(tty, ox + sx, oy + py);
if (sx != screen_size_x(s) &&
ox + screen_size_x(s) >= tty->sx &&