aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/viml/parser/parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/viml/parser/parser.h')
-rw-r--r--src/nvim/viml/parser/parser.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/viml/parser/parser.h b/src/nvim/viml/parser/parser.h
index 10ced57977..fbc5ba5f07 100644
--- a/src/nvim/viml/parser/parser.h
+++ b/src/nvim/viml/parser/parser.h
@@ -176,8 +176,9 @@ static inline void viml_parser_highlight(ParserState *const pstate,
if (pstate->colors == NULL || len == 0) {
return;
}
- // TODO(ZyX-I): May do some assert() sanitizing here.
- // TODO(ZyX-I): May join chunks.
+ assert(kv_size(*pstate->colors) == 0
+ || kv_Z(*pstate->colors, 0).start.line < start.line
+ || kv_Z(*pstate->colors, 0).end_col <= start.col);
kvi_push(*pstate->colors, ((ParserHighlightChunk) {
.start = start,
.end_col = start.col + len,