Regression.
[profile.git] / .vim / script / svn
index 175f4fb..92cc8a5 100644 (file)
@@ -23,7 +23,12 @@ fun! SVNcommit()
   set buftype=nowrite
   set bufhidden=hide
   setlocal noswapfile
+
+  " Change directory so "file [svn diff]" doesn't try to cd somewhere.
+  let l:cwd=getcwd()
+  cd /
   file [svn diff]
+  cd l:cwd
 
   " Switch back to the top window.
   wincmd k
@@ -33,9 +38,6 @@ endfun
 let s:cmdheight = &cmdheight
 se cmdheight=3
 
-" Change directory so "file [svn diff]" doesn't try to cd somewhere.
-cd /
-
 " Call and then discard our function.
 call SVNcommit()
 delfunction SVNcommit