aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-10-18 21:19:28 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-11-08 13:37:23 +0100
commit6b45ee350eab3de652ec1e9ed6d225c67e558054 (patch)
treee9ac8b0bf866f4005e2bc3390a834967f84003d1 /vis.c
parent55d22938311853415506860342511297827d00c1 (diff)
downloadvis-6b45ee350eab3de652ec1e9ed6d225c67e558054.tar.gz
vis-6b45ee350eab3de652ec1e9ed6d225c67e558054.tar.xz
vis: factor out syntax highlighting code
The view_draw function renders the text into the cells array and resyncs the cursor position. The syntax highlighting is applied in view_update, which also instructs the ui to update.
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vis.c b/vis.c
index 6222fa0..d075f8a 100644
--- a/vis.c
+++ b/vis.c
@@ -257,6 +257,9 @@ void vis_draw(Vis *vis) {
}
void vis_update(Vis *vis) {
+ for (Win *win = vis->windows; win; win = win->next)
+ view_update(win->view);
+ view_update(vis->win->view);
vis->ui->update(vis->ui);
}