diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-04-02 21:08:15 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-04-02 21:08:15 +0000 |
commit | dbf52facd2fa678a9705428d881a9d99188d401d (patch) | |
tree | d7d1dea43e8a9fe1eba5f813567765b0b3f9a2a2 /screen-redraw.c | |
parent | 84cde92c8fa4f8b6e777c9c6608312d7dbc33ced (diff) | |
download | rtmux-dbf52facd2fa678a9705428d881a9d99188d401d.tar.gz rtmux-dbf52facd2fa678a9705428d881a9d99188d401d.tar.bz2 rtmux-dbf52facd2fa678a9705428d881a9d99188d401d.zip |
Change scroll/pane redraws to only redraw the single pane affected rather than
the entire window.
Diffstat (limited to 'screen-redraw.c')
-rw-r--r-- | screen-redraw.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/screen-redraw.c b/screen-redraw.c index dda04f85..99db773b 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -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) |