summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-10-13 00:44:17 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-10-13 00:44:17 +0000
commitf9d17d0addb93259731a2cc55bf1170965cf33d1 (patch)
treea08ce39d33728d731f6485e5573e1cab4a587396 /usr.bin
parent579d45adda89c035d948033f4ede1112ce9342a7 (diff)
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 'usr.bin')
-rw-r--r--usr.bin/tmux/tty.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 21269c95df1..76cceffda3b 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.46 2009/10/12 17:19:47 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.47 2009/10/13 00:44:16 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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++) {