diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index b954dc856f..0feb07e378 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2208,7 +2208,7 @@ function! s:StatusCommand(line1, line2, range, count, bang, mods, reg, arg, args try let mods = s:Mods(a:mods, &splitbelow ? 'botright' : 'topleft') let file = fugitive#Find(':', dir) - let arg = ' +setl\ foldmethod=syntax\ foldlevel=1\|let\ w:fugitive_status=FugitiveGitDir() ' . + let arg = ' +setl\ foldmethod=syntax\ foldlevel=2\|let\ w:fugitive_status=FugitiveGitDir() ' . \ s:fnameescape(file) for winnr in range(1, winnr('$')) if s:cpath(file, fnamemodify(bufname(winbufnr(winnr)), ':p')) diff --git a/syntax/fugitive.vim b/syntax/fugitive.vim index afc0c0bc9d..8d556e7c38 100644 --- a/syntax/fugitive.vim +++ b/syntax/fugitive.vim @@ -26,7 +26,7 @@ syn match fugitiveHash /\<\x\{4,\}\>/ contained syn region fugitiveHunk start=/^\%(@@\+ -\)\@=/ end=/^\%([A-Za-z?@]\|$\)\@=/ contains=@fugitiveDiff 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=/^$/' + exe 'syn region fugitive' . s:section . 'Section start=/^\%(' . s:section . ' .*(\d\+)$\)\@=/ contains=fugitive' . s:section . 'Heading end=/^$/ fold' exe 'syn match fugitive' . s:section . 'Modifier /^[MADRCU?] / contained containedin=fugitive' . s:section . 'Section' exe 'syn cluster fugitiveSection add=fugitive' . s:section . 'Section' exe 'syn match fugitive' . s:section . 'Heading /^[A-Z][a-z][^:]*\ze (\d\+)$/ contains=fugitivePreposition contained nextgroup=fugitiveCount skipwhite'