From 3e3a899cf1972df7eac90db5b5d65678f6e03740 Mon Sep 17 00:00:00 2001 From: Bastian Winkler Date: Wed, 4 Jun 2014 12:27:12 +0200 Subject: [PATCH] Restore 'foldenable' setting when diff ends After finishing a diff session, the foldenable settings should be restored to it's previous value. --- plugin/fugitive.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 68ca819..a4d92d9 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1433,6 +1433,7 @@ function! s:diff_restore() abort \ . ' foldmethod=' . &l:foldmethod \ . ' foldcolumn=' . &l:foldcolumn \ . ' foldlevel=' . &l:foldlevel + \ . (&l:foldenable ? ' foldenable' : ' nofoldenable') if has('cursorbind') let restore .= (&l:cursorbind ? ' ' : ' no') . 'cursorbind' endif