vim-patch:e1e3474: runtime(vim): Update base syntax, fix :augroup error matching (#36512)

Only terminate the :augroup END argument at whitespace, comments and
trailing bars.

closes: vim/vim#18711

e1e347475e

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
zeertzjq
2025-11-11 09:22:00 +08:00
committed by GitHub
parent 70d1397766
commit 1eb12b896e

View File

@@ -383,13 +383,13 @@ syn cluster vimAugroupList contains=@vimCmdList,vimFilter,@vimFunc,vimLineCommen
" define
VimFolda syn region vimAugroup
\ start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+"
\ start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\%($\|[[:space:]|"#]\)\)\@!\S"
\ matchgroup=vimAugroupKey
\ end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>"
\ end="\<aug\%[roup]\ze\s\+[eE][nN][dD]\s*\%($\|[|"#]\)"
\ skipwhite nextgroup=vimAugroupEnd
\ contains=vimAutocmd,@vimAugroupList,vimAugroupkey
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
syn match vimAugroupError "\<aug\%[roup]\s\+[eE][nN][dD]\ze\s*\%($\|[|"#]\)"
endif
" TODO: Vim9 comment