aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2016-12-07 09:16:55 +0000
committernicm <nicm>2016-12-07 09:16:55 +0000
commit5ea143f521726a47fd5092dcc3abf9101af32751 (patch)
tree77d3c2fd430d078ad68f5403871196e5fa829519
parenta8f3ad448715cdb5bf0a4aa240064b4e86fae1e9 (diff)
downloadrtmux-5ea143f521726a47fd5092dcc3abf9101af32751.tar.gz
rtmux-5ea143f521726a47fd5092dcc3abf9101af32751.tar.bz2
rtmux-5ea143f521726a47fd5092dcc3abf9101af32751.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--tty.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tty.c b/tty.c
index 014a99fb..e4629813 100644
--- a/tty.c
+++ b/tty.c
@@ -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