Don't automatically enable syntax folding in status buffer

Closes https://github.com/tpope/vim-fugitive/issues/1565

References https://github.com/tpope/vim-fugitive/issues/1317
This commit is contained in:
Tim Pope
2021-03-19 20:23:39 -04:00
parent 4e85dd3424
commit 7bee1113e3

View File

@@ -2759,7 +2759,7 @@ function! s:StatusCommand(line1, line2, range, count, bang, mods, reg, arg, args
try try
let mods = s:Mods(a:mods, &splitbelow ? 'botright' : 'topleft') let mods = s:Mods(a:mods, &splitbelow ? 'botright' : 'topleft')
let file = fugitive#Find(':', dir) let file = fugitive#Find(':', dir)
let arg = ' +setl\ foldmethod=syntax\ foldlevel=1\|let\ w:fugitive_status=FugitiveGitDir() ' . let arg = ' +let\ w:fugitive_status=FugitiveGitDir() ' .
\ s:fnameescape(file) \ s:fnameescape(file)
for winnr in range(1, winnr('$')) for winnr in range(1, winnr('$'))
if s:cpath(file, fnamemodify(bufname(winbufnr(winnr)), ':p')) if s:cpath(file, fnamemodify(bufname(winbufnr(winnr)), ':p'))