diff options
author | Frederick Zhang <frederick888@tsundere.moe> | 2022-01-07 05:51:47 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-06 11:51:47 -0700 |
commit | b43575545272aeecf4e140b47485f94131430123 (patch) | |
tree | 71d21347c091b517427d7df4e9247570620649b3 | |
parent | 287d3566de11f82aa86448998fd4703b1db328bd (diff) | |
download | rneovim-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.vim | 4 |
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 |