diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-10-23 17:08:30 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-10-23 17:08:30 +0000 |
commit | 2f14ef61ff5174c466f8d8918327b9d82221b0bf (patch) | |
tree | ace1f8ac83961c90be41795f1496eee92cda3304 /screen-write.c | |
parent | 2e39ab59d723abc6c1884d356e2b0d86a7b50cc4 (diff) | |
download | rtmux-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 'screen-write.c')
-rw-r--r-- | screen-write.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/screen-write.c b/screen-write.c index 70592d18..9ef7fe59 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1,4 +1,4 @@ -/* $Id: screen-write.c,v 1.79 2009-10-23 17:07:18 tcunha Exp $ */ +/* $Id: screen-write.c,v 1.80 2009-10-23 17:08:30 tcunha 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; |