X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.vim%2Fscript%2Fp4;h=3dd4217c37582cef4fe46e4e6bb65932fa001bc7;hb=3f3bc49b281988f04653f35e777d375f49398a77;hp=59e28a11259629ae25ce2c353c4c71572f6fdd9b;hpb=21daee34ff2d1d0ca13a79abb315e689ba22d2e3;p=profile.git diff --git a/.vim/script/p4 b/.vim/script/p4 index 59e28a1..3dd4217 100644 --- a/.vim/script/p4 +++ b/.vim/script/p4 @@ -21,7 +21,7 @@ fun! P4submit() 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 != "" @@ -37,12 +37,7 @@ fun! P4submit() 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 + file [p4 diff\] " Switch back to the top window and put the cursor by the description. wincmd k