aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-02-01 23:06:24 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-02-01 23:06:24 +0000
commit9ffe549ab199b6af8cd5e7b8ac3611fdba1d6b62 (patch)
treef8a65e935bfbc7b6fca6ea1cdcbbab145358d882
parent06ce9da32ad2331791d63a18846d6e0f51a73d5c (diff)
downloadrtmux-9ffe549ab199b6af8cd5e7b8ac3611fdba1d6b62.tar.gz
rtmux-9ffe549ab199b6af8cd5e7b8ac3611fdba1d6b62.tar.bz2
rtmux-9ffe549ab199b6af8cd5e7b8ac3611fdba1d6b62.zip
If redrawing line 0 of the screen onto the tty, there can't be a wrap flag on
the previous line, so move the cursor. Fixes status line redraw issues when resizing in choose mode and hopefully at other times as well.
-rw-r--r--tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tty.c b/tty.c
index a84d8def..02ceb54e 100644
--- a/tty.c
+++ b/tty.c
@@ -484,7 +484,7 @@ 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 (oy + py == 0 || (gl != NULL && !(gl->flags & GRID_LINE_WRAPPED)) ||
+ 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);