diff options
author | nicm <nicm> | 2019-11-14 07:56:32 +0000 |
---|---|---|
committer | nicm <nicm> | 2019-11-14 07:56:32 +0000 |
commit | eb399e64d5c8f1b18e912fdf1c5488d602f78d80 (patch) | |
tree | 747c765584b40d98b8c7fab94cd5ab2173136468 /tty.c | |
parent | 08b07b1a08ad02f7a195437deead0a60f971e1ee (diff) | |
download | rtmux-eb399e64d5c8f1b18e912fdf1c5488d602f78d80.tar.gz rtmux-eb399e64d5c8f1b18e912fdf1c5488d602f78d80.tar.bz2 rtmux-eb399e64d5c8f1b18e912fdf1c5488d602f78d80.zip |
CUB and CUF are also limited by the margins so use CUP instead when
margins are enabled (we already do this for linefeed).
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2106,7 +2106,9 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy) if ((u_int) abs(change) > cx && tty_term_has(term, TTYC_HPA)) { tty_putcode1(tty, TTYC_HPA, cx); goto out; - } else if (change > 0 && tty_term_has(term, TTYC_CUB)) { + } else if (change > 0 && + tty_term_has(term, TTYC_CUB) && + !tty_use_margin(tty)) { if (change == 2 && tty_term_has(term, TTYC_CUB1)) { tty_putcode(tty, TTYC_CUB1); tty_putcode(tty, TTYC_CUB1); @@ -2114,7 +2116,9 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy) } tty_putcode1(tty, TTYC_CUB, change); goto out; - } else if (change < 0 && tty_term_has(term, TTYC_CUF)) { + } else if (change < 0 && + tty_term_has(term, TTYC_CUF) && + !tty_use_margin(tty)) { tty_putcode1(tty, TTYC_CUF, -change); goto out; } |