X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.vim%2Fscript%2Fp4;h=f7cabe5793dbb9d120db4f539faa039ad724a6e2;hb=76b5cebac934122bdf500f5d78cc73813e76d96b;hp=9f77833de1c57151e7640cd8a02be0017d0c44af;hpb=258988f92389cb66122778b4876a1390b7e6ae00;p=profile.git diff --git a/.vim/script/p4 b/.vim/script/p4 index 9f77833..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!p4 diff + exe "r!env P4DIFF= p4 diff -du " . substitute(l:files, "\n", "", "g") setf diff " Delete the blank line left above the diff.