@@ -57,37 +57,37 @@ if s:scissors
57
57
else
58
58
exe ' syn match gitcommitComment "^' . s: comment . ' .*"'
59
59
endif
60
- exe ' syn match gitcommitTrailers "\n\@<= \n\%([[:alnum:]-]\+\s*:.*\|(cherry picked from commit .*\)\%(\n\s.*\|\n[[:alnum:]-]\+\s*:.*\|\n(cherry picked from commit .*\)*\%(\n\n*\%(' . s: comment . ' \)\|\n*\%$\)\@="'
60
+ exe ' syn match gitcommitTrailers "\n\zs \n\%([[:alnum:]-]\+\s*:.*\|(cherry picked from commit .*\)\%(\n\s.*\|\n[[:alnum:]-]\+\s*:.*\|\n(cherry picked from commit .*\)*\%(\n\n*\%(' . s: comment . ' \)\|\n*\%$\)\@="'
61
61
62
62
unlet s: l s: comment s: scissors
63
63
64
64
syn match gitcommitTrailerToken " ^[[:alnum:]-]\+\s *:" contained containedin =gitcommitTrailers
65
65
66
66
syn match gitcommitHash " \<\x\{ 40,}\> " contains =@NoSpell display
67
- syn match gitcommitOnBranch " \% ( ^. \)\@ <=On branch" contained containedin =gitcommitComment nextgroup =gitcommitBranch skipwhite
68
- syn match gitcommitOnBranch " \% ( ^. \)\@ <=Your branch .\{ -\} '" contained containedin =gitcommitComment nextgroup =gitcommitBranch skipwhite
67
+ syn match gitcommitOnBranch " ^. \z sOn branch" contained containedin =gitcommitComment nextgroup =gitcommitBranch skipwhite
68
+ syn match gitcommitOnBranch " ^. \z sYour branch .\{ -\} '" contained containedin =gitcommitComment nextgroup =gitcommitBranch skipwhite
69
69
syn match gitcommitBranch " [^ ']\+ " contained
70
- syn match gitcommitNoBranch " \% ( ^. \)\@ <=Not currently on any branch." contained containedin =gitcommitComment
71
- syn match gitcommitHeader " \% ( ^. \)\@ <= \S .*[::]\% (\n ^$\)\@ !$" contained containedin =gitcommitComment
72
- syn region gitcommitAuthor matchgroup =gitCommitHeader start =/ \ % (^. \)\@ <= \% (Author\| Committer\| Date\) :/ end =/ $/ keepend oneline contained containedin =gitcommitComment transparent
73
- syn match gitcommitHeader " \ % (^. \)\@ <=commit \% ( \x\{ 40,\} $\)\@ =" contained containedin =gitcommitComment nextgroup =gitcommitHash skipwhite
74
- syn match gitcommitNoChanges " \% ( ^. \)\@ <=No changes$" contained containedin =gitcommitComment
70
+ syn match gitcommitNoBranch " ^. \z sNot currently on any branch." contained containedin =gitcommitComment
71
+ syn match gitcommitHeader " ^. \z s \S .*[::]\% (\n ^$\)\@ !$" contained containedin =gitcommitComment
72
+ syn region gitcommitAuthor matchgroup =gitCommitHeader start =/ %(^. \z s \% (Author\| Committer\| Date\) :/ end =/ $/ keepend oneline contained containedin =gitcommitComment transparent
73
+ syn match gitcommitHeader " %(^. \z scommit \% ( \x\{ 40,\} $\)\@ =" contained containedin =gitcommitComment nextgroup =gitcommitHash skipwhite
74
+ syn match gitcommitNoChanges " ^. \z sNo changes$" contained containedin =gitcommitComment
75
75
76
- syn match gitcommitType " \% ( ^.\t\)\@ <= [^[:punct:][:space:]][^/::]*[^[:punct:][:space:]][::]\z e " he =e - 1 contained containedin =gitcommitComment nextgroup =gitcommitFile skipwhite
76
+ syn match gitcommitType " ^.\t\z s [^[:punct:][:space:]][^/::]*[^[:punct:][:space:]][::]\z e " he =e - 1 contained containedin =gitcommitComment nextgroup =gitcommitFile skipwhite
77
77
syn match gitcommitFile " .\{ -\}\% ($\| -> \)\@ =" contained nextgroup =gitcommitArrow
78
78
syn match gitcommitArrow " -> " contained nextgroup =gitcommitFile
79
- syn match gitcommitUntrackedFile " \% ( ^.\t\)\@ <= [^::/]*\% (/.*\)\= $" contained containedin =gitcommitComment
79
+ syn match gitcommitUntrackedFile " ^.\t\z s [^::/]*\% (/.*\)\= $" contained containedin =gitcommitComment
80
80
81
81
syn region gitcommitUntracked start =/ ^\z (.\) Untracked files:$/ end =/ ^\z 1\= $\| ^\z 1\@ !/ contains =gitcommitHeader containedin =gitcommitComment containedin =gitcommitComment contained transparent fold
82
82
syn region gitcommitDiscarded start =/ ^\z (.\) Change\% (s not staged for commit\| d but not updated\) :$/ end =/ ^\z 1\= $\| ^\z 1\@ !/ contains =gitcommitHeader,gitcommitDiscardedType containedin =gitcommitComment containedin =gitcommitComment contained transparent fold
83
83
syn region gitcommitSelected start =/ ^\z (.\) Changes to be committed:$/ end =/ ^\z 1$\| ^\z 1\@ !/ contains =gitcommitHeader,gitcommitSelectedType containedin =gitcommitComment containedin =gitcommitComment contained transparent fold
84
84
syn region gitcommitUnmerged start =/ ^\z (.\) Unmerged paths:$/ end =/ ^\z 1\= $\| ^\z 1\@ !/ contains =gitcommitHeader,gitcommitUnmergedType containedin =gitcommitComment containedin =gitcommitComment contained transparent fold
85
85
86
- syn match gitcommitUntrackedFile " \% ( ^.\t\)\@ <= .*" contained containedin =gitcommitUntracked
86
+ syn match gitcommitUntrackedFile " ^.\t\z s .*" contained containedin =gitcommitUntracked
87
87
88
- syn match gitcommitDiscardedType " \% ( ^.\t\)\@ <= [^[:punct:][:space:]][^/::]*[^[:punct:][:space:]][::]\z e " he =e - 1 contained nextgroup =gitcommitDiscardedFile skipwhite
89
- syn match gitcommitSelectedType " \% ( ^.\t\)\@ <= [^[:punct:][:space:]][^/::]*[^[:punct:][:space:]][::]\z e " he =e - 1 contained nextgroup =gitcommitSelectedFile skipwhite
90
- syn match gitcommitUnmergedType " \% ( ^.\t\)\@ <= [^[:punct:][:space:]][^/::]*[^[:punct:][:space:]][::]\z e " he =e - 1 contained nextgroup =gitcommitUnmergedFile skipwhite
88
+ syn match gitcommitDiscardedType " ^.\t\z s [^[:punct:][:space:]][^/::]*[^[:punct:][:space:]][::]\z e " he =e - 1 contained nextgroup =gitcommitDiscardedFile skipwhite
89
+ syn match gitcommitSelectedType " ^.\t\z s [^[:punct:][:space:]][^/::]*[^[:punct:][:space:]][::]\z e " he =e - 1 contained nextgroup =gitcommitSelectedFile skipwhite
90
+ syn match gitcommitUnmergedType " ^.\t\z s [^[:punct:][:space:]][^/::]*[^[:punct:][:space:]][::]\z e " he =e - 1 contained nextgroup =gitcommitUnmergedFile skipwhite
91
91
syn match gitcommitDiscardedFile " \S .\{ -\}\% ($\| -> \)\@ =" contained nextgroup =gitcommitDiscardedArrow
92
92
syn match gitcommitSelectedFile " \S .\{ -\}\% ($\| -> \)\@ =" contained nextgroup =gitcommitSelectedArrow
93
93
syn match gitcommitUnmergedFile " \S .\{ -\}\% ($\| -> \)\@ =" contained nextgroup =gitcommitUnmergedArrow
0 commit comments