diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/screen-write.c | 14 | ||||
-rw-r--r-- | usr.bin/tmux/tty.c | 5 |
2 files changed, 10 insertions, 9 deletions
diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index 3154eb6c06b..f1394d2bee5 100644 --- a/usr.bin/tmux/screen-write.c +++ b/usr.bin/tmux/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.32 2009/10/17 08:32:18 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.33 2009/10/17 08:35:38 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -990,7 +990,7 @@ screen_write_cell( struct tty_ctx ttyctx; struct grid_utf8 gu, *tmp_gu; u_int width, xx, i; - struct grid_cell tmp_gc, tmp_gc2, *tmp_gcp; + struct grid_cell tmp_gc, *tmp_gcp; int insert = 0; /* Ignore padding. */ @@ -1101,13 +1101,13 @@ screen_write_cell( } ttyctx.utf8 = &gu; if (screen_check_selection(s, s->cx - width, s->cy)) { - memcpy(&tmp_gc2, &s->sel.cell, sizeof tmp_gc2); - tmp_gc2.data = gc->data; - tmp_gc2.flags = gc->flags & + memcpy(&tmp_gc, &s->sel.cell, sizeof tmp_gc); + tmp_gc.data = gc->data; + tmp_gc.flags = gc->flags & ~(GRID_FLAG_FG256|GRID_FLAG_BG256); - tmp_gc2.flags |= s->sel.cell.flags & + tmp_gc.flags |= s->sel.cell.flags & (GRID_FLAG_FG256|GRID_FLAG_BG256); - ttyctx.cell = &tmp_gc2; + ttyctx.cell = &tmp_gc; tty_write(tty_cmd_cell, &ttyctx); } else { ttyctx.cell = gc; diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 99bccf7ee70..6ca31f74080 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.50 2009/10/17 08:24:46 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.51 2009/10/17 08:35:38 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -850,7 +850,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); |