aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-10-23 17:08:30 +0000
committerTiago Cunha <tcunha@gmx.com>2009-10-23 17:08:30 +0000
commit2f14ef61ff5174c466f8d8918327b9d82221b0bf (patch)
treeace1f8ac83961c90be41795f1496eee92cda3304 /tty.c
parent2e39ab59d723abc6c1884d356e2b0d86a7b50cc4 (diff)
downloadrtmux-2f14ef61ff5174c466f8d8918327b9d82221b0bf.tar.gz
rtmux-2f14ef61ff5174c466f8d8918327b9d82221b0bf.tar.bz2
rtmux-2f14ef61ff5174c466f8d8918327b9d82221b0bf.zip
Sync OpenBSD patchset 416:
Always move the cursor position on !xenl terminals, since there is no invisible last cursor position. Also nuke an unused variable.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index 1524425c..609f7a45 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.154 2009-10-23 17:06:23 tcunha Exp $ */
+/* $Id: tty.c,v 1.155 2009-10-23 17:08:30 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -855,7 +855,8 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
* Should the cursor be in the last cursor position ready for a natural
* wrap? If so - and it isn't - move to and rewrite the last cell.
*/
- if (ctx->ocx + wp->xoff > tty->sx - ctx->last_width) {
+ if (!(tty->term->flags & TERM_EARLYWRAP) &&
+ ctx->ocx + wp->xoff > tty->sx - ctx->last_width) {
if (tty->cx < tty->sx) {
cx = screen_size_x(s) - ctx->last_width;
tty_cursor_pane(tty, ctx, cx, ctx->ocy);