diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 14:57:57 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 14:57:57 -0700 |
commit | c324271b99eee4c621463f368914d57cd729bd9c (patch) | |
tree | 5d979d333a2d5f9c080991d5482fd5916f8579c6 /runtime/syntax/gitcommit.vim | |
parent | 931bffbda3668ddc609fc1da8f9eb576b170aa52 (diff) | |
parent | ade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff) | |
download | rneovim-c324271b99eee4c621463f368914d57cd729bd9c.tar.gz rneovim-c324271b99eee4c621463f368914d57cd729bd9c.tar.bz2 rneovim-c324271b99eee4c621463f368914d57cd729bd9c.zip |
Merge remote-tracking branch 'upstream/master' into userreg
Diffstat (limited to 'runtime/syntax/gitcommit.vim')
-rw-r--r-- | runtime/syntax/gitcommit.vim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/syntax/gitcommit.vim b/runtime/syntax/gitcommit.vim index 42c8d4414f..bce6772762 100644 --- a/runtime/syntax/gitcommit.vim +++ b/runtime/syntax/gitcommit.vim @@ -2,7 +2,7 @@ " Language: git commit file " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: *.git/COMMIT_EDITMSG -" Last Change: 2022 Jan 05 +" Last Change: 2023 Dec 28 if exists("b:current_syntax") finish @@ -21,7 +21,11 @@ endif syn include @gitcommitDiff syntax/diff.vim syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@gitcommitDiff -syn match gitcommitSummary "^.*\%<51v." contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell +if get(g:, 'gitcommit_summary_length') < 0 + syn match gitcommitSummary "^.*$" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell +elseif get(g:, 'gitcommit_summary_length', 1) > 0 + exe 'syn match gitcommitSummary "^.*\%<' . (get(g:, 'gitcommit_summary_length', 50) + 1) . 'v." contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell' +endif syn match gitcommitOverflow ".*" contained contains=@Spell syn match gitcommitBlank "^.\+" contained contains=@Spell syn match gitcommitFirstLine "\%^.*" nextgroup=gitcommitBlank,gitcommitComment skipnl |