summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/buffer.c b/buffer.c
index 00ae04d..71e0f1e 100644
--- a/buffer.c
+++ b/buffer.c
@@ -2012,7 +2012,8 @@ void buffer_render(TextBuffer *buffer, Rect r) {
gl_color_rgba(colors[COLOR_TEXT]);
}
- if (buffer->frame_latest_line_modified >= buffer->frame_earliest_line_modified) {
+ if (buffer->frame_latest_line_modified >= buffer->frame_earliest_line_modified
+ && syntax_highlighting) {
// update syntax cache
Line *earliest = &buffer->lines[buffer->frame_earliest_line_modified];
Line *latest = &buffer->lines[buffer->frame_latest_line_modified];