1 " Define the function we'll use. It's easier to do this than to faff about
2 " trying to run a sequence of normal mode commands.
4 " Allow closing an unmodified spec.
7 " Get the modified files. Discount new files.
8 let l:files = system("sed -n '1,/^$/d;s/^[MR]....//p' " . bufname(""))
14 " Create a new window, move it below the spec and read in a diff.
16 exe "r!svn diff " . substitute(l:files, "\n", " ", "g")
19 " Delete the blank line left above the diff.
28 " Switch back to the top window.
32 " Expand the command line window so we don't have to press RETURN later.
33 let s:cmdheight = &cmdheight
36 " Call and then discard our function.
40 " Restore the command window.
41 exe "se cmdheight=" . s:cmdheight
43 " Close the scratch buffer.
44 au BufWinLeave <buffer=1> qa!