summaryrefslogtreecommitdiffstats
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
-rw-r--r--vim/plugin/diff.vim8
1 files changed, 5 insertions, 3 deletions
diff --git a/vim/plugin/diff.vim b/vim/plugin/diff.vim
index 8c4f44a..7e72569 100644
--- a/vim/plugin/diff.vim
+++ b/vim/plugin/diff.vim
@@ -25,8 +25,6 @@ function! s:diffstart(read_cmd)
diffthis
wincmd p
diffthis
- " why does this not happen automatically?
- normal! zM
endfunction
function! s:diffstop()
@@ -39,7 +37,11 @@ function! s:diffstop()
let &foldmethod = s:foldmethod
let &foldenable = s:foldenable
if &foldenable
- normal! zv
+ if &foldmethod == 'marker'
+ normal! zv
+ else
+ normal! zE
+ end
endif
let s:diffwindow = 0
endfunction