From 0bd93aa85a1a352c2bfb2f80e73f69f564b76786 Mon Sep 17 00:00:00 2001 From: Roman-Skabin Date: Sun, 7 Apr 2024 01:00:56 +0200 Subject: [PATCH] Small fix for detecting functions in C --- src/langs/c.jai | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/langs/c.jai b/src/langs/c.jai index f8912a144..888254d17 100644 --- a/src/langs/c.jai +++ b/src/langs/c.jai @@ -13,7 +13,7 @@ highlight_c_syntax :: (using buffer: *Buffer, start_offset := -1, count := -1) - prev_token := cast(*Token) prev_tokens[0]; // Maybe retroactively highlight a function - if prev_token.type == .punctuation && prev_token.punctuation == .l_paren { + if token.type == .punctuation && token.punctuation == .l_paren { // Handle "func(" if prev_token.type == .identifier { memset(colors.data + prev_token.start, xx Color.CODE_FUNCTION, prev_token.len);