aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tty.c b/tty.c
index 07e14097..12135f48 100644
--- a/tty.c
+++ b/tty.c
@@ -1345,7 +1345,7 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
*/
/* To left edge. */
- if (cx == 0) {
+ if (cx == 0) {
tty_putc(tty, '\r');
goto out;
}
@@ -1373,6 +1373,11 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
tty_putcode1(tty, TTYC_HPA, cx);
goto out;
} else if (change > 0 && tty_term_has(term, TTYC_CUB)) {
+ if (change == 2 && tty_term_has(term, TTYC_CUB1)) {
+ tty_putcode(tty, TTYC_CUB1);
+ tty_putcode(tty, TTYC_CUB1);
+ goto out;
+ }
tty_putcode1(tty, TTYC_CUB, change);
goto out;
} else if (change < 0 && tty_term_has(term, TTYC_CUF)) {