1 " $Id$ vim: se syntax=vim:
2 " Define the function we'll use. It's easier to do this than to faff about
3 " trying to run a sequence of normal mode commands.
5 " Allow closing an unmodified spec.
8 " Create a new window, move it below the spec and read in a diff.
13 " Delete the blank line left above the diff.
22 " Switch back to the top window.
26 " Expand the command line window so we don't have to press RETURN later.
27 let s:cmdheight = &cmdheight
30 " Call and then discard our function.
34 " Restore the command window.
35 exe "se cmdheight=" . s:cmdheight
37 " Close the scratch buffer.
38 au BufWinLeave <buffer=1> qa!