diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 1fd2f43..aac79c6 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2180,6 +2180,9 @@ function! fugitive#BufReadCmd(...) abort setlocal endofline try + if &foldmethod ==# 'marker' && b:fugitive_type !=# 'blob' + setlocal foldmethod=manual + endif silent exe s:DoAutocmd('BufReadPre') if b:fugitive_type ==# 'tree' let b:fugitive_display_format = b:fugitive_display_format % 2 @@ -2233,7 +2236,7 @@ function! fugitive#BufReadCmd(...) abort endif let &l:modifiable = modifiable if b:fugitive_type !=# 'blob' - setlocal filetype=git foldmethod=syntax + setlocal filetype=git call s:Map('n', 'a', ":let b:fugitive_display_format += v:count1exe fugitive#BufReadCmd(@%)", '') call s:Map('n', 'i', ":let b:fugitive_display_format -= v:count1exe fugitive#BufReadCmd(@%)", '') endif