aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-10-15 01:42:07 +0000
committerTiago Cunha <tcunha@gmx.com>2009-10-15 01:42:07 +0000
commitfe99f6fa116c74396ba102c5dc90e62171f256fb (patch)
tree0275ee7f099d8bcd0629d6ddb8dcfc12a55f6706
parent610362812942f4b5d60f3a29436ddc716d794908 (diff)
downloadrtmux-fe99f6fa116c74396ba102c5dc90e62171f256fb.tar.gz
rtmux-fe99f6fa116c74396ba102c5dc90e62171f256fb.tar.bz2
rtmux-fe99f6fa116c74396ba102c5dc90e62171f256fb.zip
Sync OpenBSD patchset 402:
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 :-/.
-rw-r--r--tty.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tty.c b/tty.c
index dc7328dd..412ac66e 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.150 2009-10-15 01:41:14 tcunha Exp $ */
+/* $Id: tty.c,v 1.151 2009-10-15 01:42:07 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -466,8 +466,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++) {