aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-10-13 00:44:16 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-10-13 00:44:16 +0000
commit4dcb5040a0bdf73ecbf504ed887600ec2f100d4c (patch)
treed1591f970a197f0ee137e2fde1239bd540841233 /tty.c
parentd7626cd9d766bdffb3f1dc729933a98c77379da2 (diff)
downloadrtmux-4dcb5040a0bdf73ecbf504ed887600ec2f100d4c.tar.gz
rtmux-4dcb5040a0bdf73ecbf504ed887600ec2f100d4c.tar.bz2
rtmux-4dcb5040a0bdf73ecbf504ed887600ec2f100d4c.zip
Instead of using something sort of similar for both newline checks, use
something the same. Doesn't fix the bug I'm looking for though :-/.
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 866ee93c..75721c63 100644
--- a/tty.c
+++ b/tty.c
@@ -461,8 +461,9 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int py, u_int ox, u_int oy)
gl = NULL;
if (py != 0)
gl = &s->grid->linedata[s->grid->hsize + py - 1];
- if (ox != 0 || (gl != NULL && !(gl->flags & GRID_LINE_WRAPPED)) ||
- tty->cy != oy + py - 1 || tty->cx < tty->sx)
+ if (oy + py == 0 || (gl != NULL && !(gl->flags & GRID_LINE_WRAPPED)) ||
+ tty->cx < tty->sx || ox != 0 ||
+ (oy + py != tty->cy + 1 && tty->cy != s->rlower + oy))
tty_cursor(tty, ox, oy + py);
for (i = 0; i < sx; i++) {