aboutsummaryrefslogtreecommitdiff
path: root/screen-redraw.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-02-11 17:04:39 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-02-11 17:04:39 +0000
commit514fe11727c1b2744fff28c525fb4f48ca944860 (patch)
treecb779320e4e9480229de37a520690edd2491b204 /screen-redraw.c
parent91c9d952793249868c7d4dea78a113fcf288929c (diff)
downloadrtmux-514fe11727c1b2744fff28c525fb4f48ca944860.tar.gz
rtmux-514fe11727c1b2744fff28c525fb4f48ca944860.tar.bz2
rtmux-514fe11727c1b2744fff28c525fb4f48ca944860.zip
We are going to need the updated screen data for emulating the scroll region,
which may involve changing the cursor position; however, the old (before redraw) cursor position is necessary for writing to the tty. So, save it before doing the redraw then update the internal screen then update the tty. Not sure I like this solution but it does the job for now.
Diffstat (limited to 'screen-redraw.c')
-rw-r--r--screen-redraw.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/screen-redraw.c b/screen-redraw.c
index fc3d3eb9..917f7175 100644
--- a/screen-redraw.c
+++ b/screen-redraw.c
@@ -1,4 +1,4 @@
-/* $Id: screen-redraw.c,v 1.21 2009-02-11 06:50:15 nicm Exp $ */
+/* $Id: screen-redraw.c,v 1.22 2009-02-11 17:04:38 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -135,15 +135,13 @@ screen_redraw_line(struct client *c, struct screen *s, u_int oy, u_int py)
if (sx > c->sx)
sx = c->sx;
for (i = 0; i < sx; i++) {
- s->cx = i;
- s->cy = py;
-
gc = grid_view_peek_cell(s->grid, i, py);
+ tty_cursor(&c->tty, i, py, oy);
if (screen_check_selection(s, i, py)) {
memcpy(&tc, &s->sel.cell, sizeof tc);
tc.data = gc->data;
- tty_cell(&c->tty, s, oy, &tc);
+ tty_cell(&c->tty, &tc);
} else
- tty_cell(&c->tty, s, oy, gc);
+ tty_cell(&c->tty, gc);
}
}