Skip to content

Commit

Permalink
Move foldtext autocommand back to folding section
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Jun 1, 2018
1 parent f8913cd commit ddec4bf
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions plugin/fugitive.vim
Expand Up @@ -298,11 +298,6 @@ augroup fugitive
autocmd FileReadCmd fugitive://**//[0-9a-f][0-9a-f]* exe fugitive#FileRead()

autocmd User Flags call Hoist('buffer', function('FugitiveStatusline'))

autocmd User Fugitive
\ if &filetype =~# '^git\%(commit\)\=$' && &foldtext ==# 'foldtext()' |
\ set foldtext=fugitive#Foldtext() |
\ endif
augroup END

" Section: Initialization
Expand Down Expand Up @@ -3222,3 +3217,11 @@ endfunction
function! fugitive#foldtext() abort
return fugitive#Foldtext()
endfunction

augroup fugitive_folding
autocmd!
autocmd User Fugitive
\ if &filetype =~# '^git\%(commit\)\=$' && &foldtext ==# 'foldtext()' |
\ set foldtext=fugitive#Foldtext() |
\ endif
augroup END

0 comments on commit ddec4bf

Please sign in to comment.