diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2016-12-07 09:16:56 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2016-12-07 09:16:56 +0000 |
commit | 62525b0bdf259ac858b2b090d001961668021d92 (patch) | |
tree | 1f2d2a7fd221c41a3534c3d7cc5f73e75b2b9124 | |
parent | c5921d66f3fce71d00b8f6cac23b2006a87544ea (diff) |
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.c | 5 |
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 |