runtime(vim): Error codes should not be highlighed with vim9CommentTitle

closes: #19390

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Peter Kenny
2026-02-15 15:59:36 +00:00
committed by Christian Brabandt
parent a2d87ba615
commit 3794d9b33c
13 changed files with 42 additions and 26 deletions
+1 -1
View File
@@ -2340,7 +2340,7 @@ Vim9 syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\%(\\\|#\\ \)
VimL syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\%(\\\|"\\ \)+ end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle extend
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
syn match vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup
syn match vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\%([A-DF-Z]\w*\|E\%(\d\{1,4}\>\)\@!\w*\)\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup
" allowed anywhere in the file
if !s:vim9script
@@ -17,4 +17,4 @@
@75
|#+0#0000e05&| |M|u|l|t|i|l|i|n|e| |c|o|m@1|e|n|t|s| +0#0000000&@54
@75
@57|1|9|,|0|-|1| @7|1|7|%|
@57|1|9|,|0|-|1| @7|1|6|%|
@@ -17,4 +17,4 @@
@75
|#+0#0000e05&| |L|i|n|e|-|c|o|n|t|i|n|u|a|t|i|o|n| |c|o|m@1|e|n|t|s| +0#0000000&@46
@75
@57|3|7|,|1| @9|4|2|%|
@57|3|7|,|1| @9|3|8|%|
@@ -17,4 +17,4 @@
@2|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@63
|}+0#e000e06&| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@63
@75
@57|5@1|,|7| @9|6|7|%|
@57|5@1|,|7| @9|6|1|%|
@@ -17,4 +17,4 @@
|#+0#0000e05&| |h|t@1|p|s|:|/@1|g|i|t|h|u|b|.|c|o|m|/|v|i|m|/|v|i|m|/|p|u|l@1|/|1|4|9|7|5|#|i|s@1|u|e|c|o|m@1|e|n|t|-|2|8|3|2|6|4|3|1@1|5| +0#0000000&@11
@75
|v+0#af5f00255&|a|r| +0#0000000&|d+0#00e0e07&| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#e000e06&| +0#0000000&@65
@57|7|3|,|3| @9|9|1|%|
@57|7|3|,|3| @9|8|3|%|
@@ -5,16 +5,16 @@
|b+0#00e0e07&|:| +0#0000000&|0+0#e000002&|,+0#0000000&| @69
>}+0#e000e06&| +0#0000000&@73
@75
@75
|#+0#0000e05&| +0#0000000&|P+0#e000e06&|R|:| +0#0000e05&|#|1|9|3|9|0| +0#0000000&@62
|#+0#0000e05&| |h|t@1|p|s|:|/@1|g|i|t|h|u|b|.|c|o|m|/|v|i|m|/|v|i|m|/|p|u|l@1|/|1|9|3|9|0|#|i|s@1|u|e|-|3|9|3@1|7|5@1|8|4|6| +0#0000000&@18
@75
|#+0#0000e05&| |E|1|2|3|4|:| |s|h|o|u|l|d| |n|o|t| |h|a|v|e| |v|i|m|9|C|o|m@1|e|n|t|T|i|t|l|e| |o|n| |'|E|1|2|3|4|:|'| +0#0000000&@21
|#+0#0000e05&| +0#0000000&|E+0#e000e06&|R@1|3|4|:| +0#0000e05&|s|h|o|u|l|d| |h|a|v|e| |v|i|m|9|C|o|m@1|e|n|t|T|i|t|l|e| |o|n| |'|E|R@1|3|4|:|'| +0#0000000&@25
@75
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|9|1|,|1| @9|B|o|t|
@@ -17,4 +17,4 @@
@75
|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
| +0#0000e05&@1|\| |c|o|n|t|i|n|u|i|n|g| |c|o|m@1|e|n|t| +0#0000000&@52
@57|1|9|,|3| @9|2|3|%|
@57|1|9|,|3| @9|2|0|%|
@@ -17,4 +17,4 @@
@75
|:|F|o@1| @70
@6|"+0#0000e05&|\| |l|i|n|e| |c|o|n|t|i|n|u|a|t|i|o|n| |c|o|m@1|e|n|t| +0#0000000&@40
@57|3|7|,|3| @9|5|6|%|
@57|3|7|,|3| @9|4|8|%|
@@ -17,4 +17,4 @@
|"+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| +0#0000000&@45
@75
@75
@57|5@1|,|0|-|1| @7|8|9|%|
@57|5@1|,|0|-|1| @7|7|6|%|
@@ -5,16 +5,16 @@
@2|#+0#0000e05&| +0#0000000&|T+0#e000e06&|i|t|l|e|:| +0#0000e05&|.@2| +0#0000000&@60
>e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
@75
@75
|"+0#0000e05&| +0#0000000&|P+0#e000e06&|R|:| +0#0000e05&|#|1|9|3|9|0| +0#0000000&@62
|"+0#0000e05&| |h|t@1|p|s|:|/@1|g|i|t|h|u|b|.|c|o|m|/|v|i|m|/|v|i|m|/|p|u|l@1|/|1|9|3|9|0|#|i|s@1|u|e|-|3|9|3@1|7|5@1|8|4|6| +0#0000000&@18
@75
|d+0#af5f00255&|e|f| +0#0000000&|C|o|m@1|e|n|t|T|i|t|l|e|2|(+0#e000e06&|)| +0#0000000&@55
@2|#+0#0000e05&| |E|1|2|3|4|:| |s|h|o|u|l|d| |n|o|t| |h|a|v|e| |v|i|m|9|C|o|m@1|e|n|t|T|i|t|l|e| |o|n| |'|E|1|2|3|4|:|'| +0#0000000&@19
@2|#+0#0000e05&| +0#0000000&|E+0#e000e06&|R@1|3|4|:| +0#0000e05&|s|h|o|u|l|d| |h|a|v|e| |v|i|m|9|C|o|m@1|e|n|t|T|i|t|l|e| |o|n| |'|E|R@1|3|4|:|'| +0#0000000&@23
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
@75
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|7|3|,|1| @9|B|o|t|
@@ -90,3 +90,10 @@ var d = {
b: 0,
}
# PR: #19390
# https://github.com/vim/vim/pull/19390#issue-3933755846
# E1234: should not have vim9CommentTitle on 'E1234:'
# ERR34: should have vim9CommentTitle on 'ERR34:'
@@ -72,3 +72,12 @@ def CommentTitle()
# Title: ...
enddef
" PR: #19390
" https://github.com/vim/vim/pull/19390#issue-3933755846
def CommentTitle2()
# E1234: should not have vim9CommentTitle on 'E1234:'
# ERR34: should have vim9CommentTitle on 'ERR34:'
enddef
+2 -2
View File
@@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2026 Jan 30
" Last Change: 2026 Feb 13
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@@ -2403,7 +2403,7 @@ Vim9 syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\%(\\\|#\\ \)
VimL syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\%(\\\|"\\ \)+ end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle extend
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
syn match vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup
syn match vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\%([A-DF-Z]\w*\|E\%(\d\{1,4}\>\)\@!\w*\)\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup
" allowed anywhere in the file
if !s:vim9script