X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.vim%2Fscript%2Fp4;fp=.vim%2Fscript%2Fp4;h=f7cabe5793dbb9d120db4f539faa039ad724a6e2;hb=bc811c4ff356d27ed2d16eac2c8c16afd034510e;hp=ecaacafc037acd288d55d3a2c9c0a3f50ad3d8ae;hpb=736982b20af663fed7884dc39fe050eabdfbd511;p=profile.git diff --git a/.vim/script/p4 b/.vim/script/p4 index ecaacaf..f7cabe5 100644 --- a/.vim/script/p4 +++ b/.vim/script/p4 @@ -15,9 +15,12 @@ fun! P4submit() " Allow closing an unmodified spec. set nomod + " Get the files in the changelist. + let l:files = system("sed -n 's/ #.*//p' " . bufname("")) + " Create a new window, move it below the spec and read in a diff. botright new - r!env P4DIFF= p4 diff -du + exe "r!env P4DIFF= p4 diff -du " . substitute(l:files, "\n", "", "g") setf diff " Delete the blank line left above the diff.