summaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-01-02 19:07:19 -0500
committerdoy <doy@tozt.net>2009-01-02 19:07:19 -0500
commitf05e874406047bd209fe8093973cb5f2e6f92a1e (patch)
treef0183aa3b5dd24a0abdc65916d376a9f9c55b4f5 /vimrc
parent69facc5aa3832a1baa126baba9259fc0b1ad1526 (diff)
downloadconf-f05e874406047bd209fe8093973cb5f2e6f92a1e.tar.gz
conf-f05e874406047bd209fe8093973cb5f2e6f92a1e.zip
only close the alternate diff window if it exists
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc6
1 files changed, 4 insertions, 2 deletions
diff --git a/vimrc b/vimrc
index 1cd2731..5525849 100644
--- a/vimrc
+++ b/vimrc
@@ -394,8 +394,10 @@ function s:diffstart(read_cmd)
endfunction
function s:diffstop()
diffoff!
- wincmd t
- quit
+ if winnr('$') != 1
+ wincmd t
+ quit
+ endif
let &foldmethod = s:foldmethod
let &foldenable = s:foldenable
endfunction