" 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.
" Allow closing an unmodified spec.
set nomod
+ " Get the modified files.
+ let l:files = system("sed '1,/^$/d;s/^[MR]....//' " . bufname(""))
+
" Create a new window, move it below the spec and read in a diff.
botright new
- r!svn diff
+ exe "r!svn diff " . substitute(l:files, "\n", " ", "g")
setf diff
" Delete the blank line left above the diff.