From ddec4bfa867650b926874bdf0569dba8e4d52e6f Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 1 Jun 2018 13:25:21 -0400 Subject: [PATCH] Move foldtext autocommand back to folding section --- plugin/fugitive.vim | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index ac54dde..20743d6 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -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 @@ -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