X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.vim%2Fscript%2Fsvn;fp=.vim%2Fscript%2Fsvn;h=92cc8a5395809b512b162ca0fccce428c886609d;hb=21daee34ff2d1d0ca13a79abb315e689ba22d2e3;hp=175f4fbab3ae096cda04b88e626a8b57eb91a020;hpb=76559e10296433ab488b9d9940c50a39282ee49a;p=profile.git diff --git a/.vim/script/svn b/.vim/script/svn index 175f4fb..92cc8a5 100644 --- a/.vim/script/svn +++ b/.vim/script/svn @@ -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