summaryrefslogtreecommitdiff
path: root/syntax.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-03-04 16:06:50 -0500
committerpommicket <pommicket@gmail.com>2023-03-04 16:06:50 -0500
commited9d2be11db07ed1e31e884004ae65b14991de1a (patch)
tree50d7b3a19089c168d37912143963dbcceff63a16 /syntax.c
parent2bdf5709514f5ff4fd734945c883f7789d9cda64 (diff)
highlight directives in ted.cfg
Diffstat (limited to 'syntax.c')
-rw-r--r--syntax.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/syntax.c b/syntax.c
index 6abd1cd..3e9d3d9 100644
--- a/syntax.c
+++ b/syntax.c
@@ -1190,6 +1190,11 @@ static void syntax_highlight_cfg(SyntaxState *state, const char32_t *line, u32 l
return;
}
+ if (!string && is_ted_cfg && line[0] == '%') {
+ memset(char_types, SYNTAX_PREPROCESSOR, line_len);
+ return;
+ }
+
int backslashes = 0;
for (u32 i = 0; i < line_len; ++i) {