aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Zhang <frederick888@tsundere.moe>2022-01-07 05:51:47 +1100
committerGitHub <noreply@github.com>2022-01-06 11:51:47 -0700
commitb43575545272aeecf4e140b47485f94131430123 (patch)
tree71d21347c091b517427d7df4e9247570620649b3
parent287d3566de11f82aa86448998fd4703b1db328bd (diff)
downloadrneovim-b43575545272aeecf4e140b47485f94131430123.tar.gz
rneovim-b43575545272aeecf4e140b47485f94131430123.tar.bz2
rneovim-b43575545272aeecf4e140b47485f94131430123.zip
fix(runtime): check markdownError before syn-clear (#16930)
Avoids `E28: No such highlight group name: markdownError` when using a foreign markdown syntax.
-rw-r--r--runtime/syntax/checkhealth.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/syntax/checkhealth.vim b/runtime/syntax/checkhealth.vim
index dff880a0bc..37f1822740 100644
--- a/runtime/syntax/checkhealth.vim
+++ b/runtime/syntax/checkhealth.vim
@@ -12,7 +12,9 @@ unlet! b:current_syntax
syn case match
" We do not care about markdown syntax errors
-syn clear markdownError
+if hlexists('markdownError')
+ syn clear markdownError
+endif
syn keyword healthError ERROR[:] containedin=markdownCodeBlock,mkdListItemLine
syn keyword healthWarning WARNING[:] containedin=markdownCodeBlock,mkdListItemLine