aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-08-22 00:01:10 +0100
committerThomas Adam <thomas@xteddy.org>2017-08-22 00:01:10 +0100
commit730312e60f7acb462e5e58895a61e42dc2df9434 (patch)
treeaa41bb3cc30ef42a50360ed9c5a1a69e50bc704f /tty.c
parentccdc3690257862481c3d193d150a071fba094a11 (diff)
parentbbe9da063e1bc4e88d5954e7f2f5ad49c0aecad0 (diff)
downloadrtmux-730312e60f7acb462e5e58895a61e42dc2df9434.tar.gz
rtmux-730312e60f7acb462e5e58895a61e42dc2df9434.tar.bz2
rtmux-730312e60f7acb462e5e58895a61e42dc2df9434.zip
Merge branch 'obsd-master'
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index d83d4ced..24c5d83e 100644
--- a/tty.c
+++ b/tty.c
@@ -1609,7 +1609,8 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
}
/* Zero on the next line. */
- if (cx == 0 && cy == thisy + 1 && thisy != tty->rlower) {
+ if (cx == 0 && cy == thisy + 1 && thisy != tty->rlower &&
+ (!tty_use_margin(tty) || tty->rleft == 0)) {
tty_putc(tty, '\r');
tty_putc(tty, '\n');
goto out;
@@ -1622,7 +1623,7 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
*/
/* To left edge. */
- if (cx == 0) {
+ if (cx == 0 && (!tty_use_margin(tty) || tty->rleft == 0)) {
tty_putc(tty, '\r');
goto out;
}