Fixed p4 diff breaking as a result of the directory change.
set buftype=nowrite
set bufhidden=hide
setlocal noswapfile
+
+ " Change directory so "file [p4 diff]" doesn't try to cd somewhere.
+ let l:cwd=getcwd()
+ cd /
file [p4 diff]
+ cd l:cwd
" Switch back to the top window and put the cursor by the description.
wincmd k
let s:cmdheight = &cmdheight
set cmdheight=3
-" Change directory so "file [p4 diff]" doesn't try to cd somewhere.
-cd /
-
" Call and then discard our function.
call P4submit()
delfunction P4submit
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
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