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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/viml/parser/parser.h b/src/nvim/viml/parser/parser.h
index a17edac403..10ced57977 100644
--- a/src/nvim/viml/parser/parser.h
+++ b/src/nvim/viml/parser/parser.h
@@ -173,7 +173,7 @@ static inline void viml_parser_highlight(ParserState *const pstate,
const size_t len,
const char *const group)
{
- if (pstate->colors == NULL) {
+ if (pstate->colors == NULL || len == 0) {
return;
}
// TODO(ZyX-I): May do some assert() sanitizing here.