X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.vim%2Fscript%2Fsvn;fp=.vim%2Fscript%2Fsvn;h=fcca7e4ad9c7dd3c0c9358c8c0964b4a4035b547;hb=dfa89955cebc320a07b0228f743c000a838bf601;hp=c47f2183ad3a80b792f636235473d06ec51617bf;hpb=fc1fababbed523942492305e847e944757c7dde3;p=profile.git diff --git a/.vim/script/svn b/.vim/script/svn index c47f218..fcca7e4 100644 --- a/.vim/script/svn +++ b/.vim/script/svn @@ -1,4 +1,4 @@ -" $Id$ +" $Id$ vim: set syntax=vim: " Define the function we'll use. It's easier to do this than to faff about " trying to run a sequence of normal mode commands. fun! SVNcommit() @@ -34,4 +34,10 @@ delfunction SVNcommit exe "se cmdheight=" . s:cmdheight " Close the scratch buffer. -au BufWinLeave qa! +if version >= 700 + " Vim 7 lets us close the buffer by number. The changelist is always in #1. + au BufWinLeave qa! +else + " Prior versions can only do it by name. Fall back to a temporary file. + au BufWinLeave /tmp/tmp.*.* qa! +endif