summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2010-02-01 23:06:24 +0000
committernicm <nicm@openbsd.org>2010-02-01 23:06:24 +0000
commit37a105f21bbdde38d4db5df73c536407aa27bd73 (patch)
tree41862ea66be0394e28e36ac20f432db94e2f31e1 /usr.bin/tmux/tty.c
parentAdd scroll-up/scroll-down for choose/more mode, from Micah Cowan. (diff)
downloadwireguard-openbsd-37a105f21bbdde38d4db5df73c536407aa27bd73.tar.xz
wireguard-openbsd-37a105f21bbdde38d4db5df73c536407aa27bd73.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.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 777b697f116..81994b73c74 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.82 2010/01/01 14:29:18 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.83 2010/02/01 23:06:24 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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);