runtime(help): support highlighting groups in translated syntax doc

closes: #19942

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Hirohito Higashi
2026-04-09 18:38:35 +00:00
committed by Christian Brabandt
parent 3e194b1068
commit 72cefe6b72
+3 -2
View File
@@ -1,8 +1,9 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Nov 13
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2025 Nov 13
" 2026 Apr 09 by Vim project: improve pattern for translated syntaxt.txt #19942
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -306,7 +307,7 @@ hi def link helpDiffAdded Added
hi def link helpDiffChanged Changed
hi def link helpDiffRemoved Removed
if has('textprop') && expand('%:p') =~ '[/\\]doc[/\\]syntax.txt'
if has('textprop') && expand('%:p') =~? '[/\\]doc[/\\]syntax.\(txt\|\a\ax\)$'
" highlight groups with their respective color
import 'dist/vimhelp.vim'
call vimhelp.HighlightGroups()