mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-10 04:23:46 -05:00
Tighten up diff highlighting
Closes https://github.com/tpope/vim-fugitive/issues/1747
This commit is contained in:
@@ -26,7 +26,7 @@ syn match fugitiveSymbolicRef /\.\@!\%(\.\.\@!\|[^[:space:][:cntrl:]\:.]\)\+\.\@
|
|||||||
syn match fugitiveHash /^\x\{4,\}\S\@!/ contained containedin=@fugitiveSection
|
syn match fugitiveHash /^\x\{4,\}\S\@!/ contained containedin=@fugitiveSection
|
||||||
syn match fugitiveHash /\S\@<!\x\{4,\}\S\@!/ contained
|
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']
|
for s:section in ['Untracked', 'Unstaged', 'Staged']
|
||||||
exe 'syn region fugitive' . s:section . 'Section start=/^\%(' . s:section . ' .*(\d\+)$\)\@=/ contains=fugitive' . s:section . 'Heading end=/^$/'
|
exe 'syn region fugitive' . s:section . 'Section start=/^\%(' . s:section . ' .*(\d\+)$\)\@=/ contains=fugitive' . s:section . 'Heading end=/^$/'
|
||||||
|
|||||||
Reference in New Issue
Block a user