summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2016-12-07 09:16:55 +0000
committernicm <nicm@openbsd.org>2016-12-07 09:16:55 +0000
commit16277cf22bfec56cd35a59f2cba4a73ce0c260ce (patch)
treeeea801184a7dd3b44fea6aa8daef61039e723501
parentMake prefix work in all tables (except the prefix table). Users who want (diff)
downloadwireguard-openbsd-16277cf22bfec56cd35a59f2cba4a73ce0c260ce.tar.xz
wireguard-openbsd-16277cf22bfec56cd35a59f2cba4a73ce0c260ce.zip
Only skip moving the cursor if it is already in the last position _on
the same line_, fixes redraw bug reported by patrick keshishian.
-rw-r--r--usr.bin/tmux/tty.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index fa0892e6e1f..08877586c6c 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.217 2016/11/30 13:20:02 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.218 2016/12/07 09:16:55 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1153,7 +1153,8 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
tty_cursor_pane(tty, ctx, 0, ctx->ocy + 1);
else
tty_cursor_pane(tty, ctx, 0, ctx->ocy);
- } else if (tty->cx != tty->sx - 1) {
+ } else if (tty->cy != ctx->yoff + ctx->ocy ||
+ tty->cx < tty->sx) {
/*
* The cursor isn't in the last position already, so
* move as far right as possible and redraw the last