aboutsummaryrefslogtreecommitdiff
path: root/screen-redraw.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-03-27 16:44:51 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-03-27 16:44:51 +0000
commitf6001f9ffc269dfec3c84f4f25d9561d845b8b01 (patch)
tree94c332677c78aa57ebd1d313379cb5c0dcf864bb /screen-redraw.c
parentb97264bb70898465fbdba6a79cd1614b0f09c0fc (diff)
downloadrtmux-f6001f9ffc269dfec3c84f4f25d9561d845b8b01.tar.gz
rtmux-f6001f9ffc269dfec3c84f4f25d9561d845b8b01.tar.bz2
rtmux-f6001f9ffc269dfec3c84f4f25d9561d845b8b01.zip
Whoops. Didn't mean to commit this yet.
Diffstat (limited to 'screen-redraw.c')
-rw-r--r--screen-redraw.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/screen-redraw.c b/screen-redraw.c
index 7752705d..11147e02 100644
--- a/screen-redraw.c
+++ b/screen-redraw.c
@@ -1,4 +1,4 @@
-/* $Id: screen-redraw.c,v 1.27 2009-03-27 16:44:00 nicm Exp $ */
+/* $Id: screen-redraw.c,v 1.28 2009-03-27 16:44:51 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -128,5 +128,21 @@ screen_redraw_blanky(struct client *c, u_int oy, u_int ny, char ch)
void
screen_redraw_line(struct client *c, struct screen *s, u_int oy, u_int py)
{
- tty_draw_line(&c->tty, s, py, oy);
+ const struct grid_cell *gc;
+ struct grid_cell tc;
+ u_int i, sx;
+
+ sx = screen_size_x(s);
+ if (sx > c->tty.sx)
+ sx = c->tty.sx;
+ for (i = 0; i < sx; i++) {
+ 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, &tc);
+ } else
+ tty_cell(&c->tty, gc);
+ }
}