diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-31 20:39:36 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-31 20:39:36 -0500 |
commit | 442e0b92a09689cd75e2d20608572a279bef5390 (patch) | |
tree | 67d5e2a79ffcb1413ed10b49f70a185fef55ef68 /buffer.c | |
parent | 68b3e3928e1bd05ebbb56810ae8b7a68ff5f12b0 (diff) |
more syntax highlighting
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1974,6 +1974,10 @@ void buffer_render(TextBuffer *buffer, Rect r) { SyntaxState syntax_state = {0}; // dynamic array of character types, to be filled by syntax_highlight SyntaxCharType *char_types = NULL; + for (u32 line_idx = 0; line_idx < start_line; ++line_idx) { + Line *line = &lines[line_idx]; + syntax_highlight(&syntax_state, LANG_C, line->str, line->len, NULL); + } for (u32 line_idx = start_line; line_idx < nlines; ++line_idx) { Line *line = &lines[line_idx]; |