commit 0868c30cc08a4cf49b5f43e08412c671b19fa3f0 (tree)
parent 32b0d6266361614a6a07cfe850750e900cd50575
Author: Tim Pope <code@tpope.net>
Date: Wed, 12 May 2021 13:50:14 -0400
Tighten up diff highlighting
Closes https://github.com/tpope/vim-fugitive/issues/1747
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/syntax/fugitive.vim b/syntax/fugitive.vim
@@ -26,7 +26,7 @@ syn match fugitiveSymbolicRef /\.\@!\%(\.\.\@!\|[^[:space:][:cntrl:]\:.]\)\+\.\@
syn match fugitiveHash /^\x\{4,\}\S\@!/ contained containedin=@fugitiveSection
syn match fugitiveHash /\S\@<!\x\{4,\}\S\@!/ contained
-syn region fugitiveHunk start=/^\%(@@\+ -\)\@=/ end=/^\%([A-Za-z?@]\|$\)\@=/ contains=@fugitiveDiff containedin=@fugitiveSection fold
+syn region fugitiveHunk start=/^\%(@@\+ -\)\@=/ end=/^\%([A-Za-z?@]\|$\)\@=/ contains=diffLine,diffRemoved,diffAdded,diffNoEOL containedin=@fugitiveSection fold
for s:section in ['Untracked', 'Unstaged', 'Staged']
exe 'syn region fugitive' . s:section . 'Section start=/^\%(' . s:section . ' .*(\d\+)$\)\@=/ contains=fugitive' . s:section . 'Heading end=/^$/'