set nomod
" Get the files in the changelist.
- let l:files = system("sed -n 's@^ \\(//.*\\) #.*@\\1@p' " . bufname(""))
+ let l:files = system("sed -n 's@^ \\(//.*\\) #.*@\"\\1\"@p' " . bufname(""))
" Create a new window, move it below the spec and read in a diff.
botright new
if l:files != ""
set buftype=nowrite
set bufhidden=hide
setlocal noswapfile
- file [p4 diff]
+ file [p4 diff\]
" 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