summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-02 09:09:07 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-02 09:09:07 -0500
commit5882fac07ab1215ec4bbc859c693b28b06e6b469 (patch)
treedc4f0234126ef903768346d1d5caab2026b26b7f /buffer.c
parentb042a8599c47b2fd41c7eb0d22ec417ca629a986 (diff)
fix bug with non-highlighted files
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];