summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-11-21 18:24:49 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-11-21 18:24:49 +0000
commit24c39950ff6b9b6d0e49d2d1341552b4fe524357 (patch)
tree8f2436ef1e2228e6a5c8bac125c513c5c3656c4a /window.c
parentdf158734c20494ee895b81a045ed66dcffd44f86 (diff)
Redo screen.c functions to make them readable and more flexible. Make scroll mode only redraw waht it needs.
Diffstat (limited to 'window.c')
-rw-r--r--window.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/window.c b/window.c
index 40d8d2ea..111f8109 100644
--- a/window.c
+++ b/window.c
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.29 2007-11-21 15:35:53 nicm Exp $ */
+/* $Id: window.c,v 1.30 2007-11-21 18:24:49 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -284,10 +284,16 @@ window_parse(struct window *w, struct buffer *b)
void
window_draw(struct window *w, struct buffer *b, u_int py, u_int ny)
{
+ struct screen *s = &w->screen;
+ struct screen_draw_ctx ctx;
+
if (w->mode != NULL)
w->mode->draw(w, b, py, ny);
- else
- screen_draw(&w->screen, b, py, ny, 0, 0);
+ else {
+ screen_draw_start(&ctx, s, b, 0, 0);
+ screen_draw_lines(&ctx, py, ny);
+ screen_draw_stop(&ctx);
+ }
}
void