summaryrefslogtreecommitdiffstats
path: root/screen-write.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-10-17 08:35:38 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-10-17 08:35:38 +0000
commitdaa26079ee82aed8a1eaf053ea3df5d2276eb472 (patch)
tree73a4edc92be7e730293cffa01ab84f7514dec349 /screen-write.c
parentfe26b5d25fd9bfda2a787db1dc524c76004703dd (diff)
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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/screen-write.c b/screen-write.c
index 0cee126f..035ca89f 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -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;