summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2016-11-30 13:20:02 +0000
committernicm <nicm@openbsd.org>2016-11-30 13:20:02 +0000
commitf994c4a8ae9b28080cca6fa1db2e08f2c8738f04 (patch)
treede0e381a24629998fbb45a43ab20d93c0d9b2ef2 /usr.bin/tmux/tty.c
parentAdd Copyright and license. (diff)
downloadwireguard-openbsd-f994c4a8ae9b28080cca6fa1db2e08f2c8738f04.tar.xz
wireguard-openbsd-f994c4a8ae9b28080cca6fa1db2e08f2c8738f04.zip
Fix check for cursor at end of line.
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 4a6aa61eb5f..fa0892e6e1f 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.216 2016/11/28 17:50:00 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.217 2016/11/30 13:20:02 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1153,7 +1153,7 @@ 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) {
+ } else if (tty->cx != tty->sx - 1) {
/*
* The cursor isn't in the last position already, so
* move as far right as possible and redraw the last