From 514fe11727c1b2744fff28c525fb4f48ca944860 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 11 Feb 2009 17:04:39 +0000 Subject: 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. --- screen-redraw.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'screen-redraw.c') 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 @@ -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); } } -- cgit