diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-01 14:51:11 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-01 14:51:11 -0500 |
commit | fe4d14a5bb135a925bb47fe88b1a78df0d03cd49 (patch) | |
tree | 27f2bae9aaaea8ec0990e46a87a1d58b4e7669ab /buffer.c | |
parent | e53329668e403a6b73bc8c9b56ad6b55eecba4e9 (diff) |
start per-buffer language
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1980,7 +1980,7 @@ void buffer_render(TextBuffer *buffer, Rect r) { 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); + syntax_highlight(&syntax_state, buffer->language, line->str, line->len, NULL); } for (u32 line_idx = start_line; line_idx < nlines; ++line_idx) { @@ -1988,7 +1988,7 @@ void buffer_render(TextBuffer *buffer, Rect r) { if (arr_len(char_types) < line->len) { arr_set_len(char_types, line->len); } - syntax_highlight(&syntax_state, LANG_C, line->str, line->len, char_types); + syntax_highlight(&syntax_state, buffer->language, line->str, line->len, char_types); for (u32 i = 0; i < line->len; ++i) { char32_t c = line->str[i]; SyntaxCharType type = char_types[i]; |