Change scroll/pane redraws to only redraw the single pane affected rather than

the entire window.
This commit is contained in:
Nicholas Marriott
2009-04-02 21:08:15 +00:00
parent 84cde92c8f
commit dbf52facd2
5 changed files with 51 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $Id: screen-redraw.c,v 1.33 2009-04-01 21:09:01 nicm Exp $ */
/* $Id: screen-redraw.c,v 1.34 2009-04-02 21:08:13 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -109,7 +109,7 @@ screen_redraw_screen(struct client *c)
tty_putc(&c->tty, '|');
}
}
/* Draw top and bottom borders. */
if (wp->yoff > 0) {
tty_cursor(tty, wp->xoff, wp->yoff - 1, 0, 0);
@ -121,16 +121,26 @@ screen_redraw_screen(struct client *c)
for (i = 0; i < sx; i++)
tty_putc(tty, '-');
}
/* Draw the pane. */
for (i = 0; i < sy; i++)
tty_draw_line(tty, s, i, wp->xoff, wp->yoff);
screen_redraw_pane(c, wp);
}
/* Draw the status line. */
screen_redraw_status(c);
}
/* Draw a single pane. */
void
screen_redraw_pane(struct client *c, struct window_pane *wp)
{
u_int i;
for (i = 0; i < wp->sy; i++)
tty_draw_line(&c->tty, wp->screen, i, wp->xoff, wp->yoff);
}
/* Draw the status line. */
void
screen_redraw_status(struct client *c)