From 410b9792f6dbcf071f50f29e9f935a6de83a6078 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 17 Apr 2017 08:10:44 +0000 Subject: [PATCH] Don't bother moving the cursor for empty lines. --- usr.bin/tmux/tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index f556400e3c9..36e39955680 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.260 2017/04/17 06:40:32 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.261 2017/04/17 08:10:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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 && -- 2.20.1