diff --git a/runtime/syntax/testdir/runtest.vim b/runtime/syntax/testdir/runtest.vim index f71ccf1638..b3a6612b77 100644 --- a/runtime/syntax/testdir/runtest.vim +++ b/runtime/syntax/testdir/runtest.vim @@ -76,7 +76,14 @@ let s:vimcmdSyntaxFname = fnameescape(syntaxDir .. '/testdir/vimcmd') if filereadable(s:vimcmdSyntaxFname) call delete('vimcmd') call filecopy(s:vimcmdSyntaxFname, 'vimcmd') - exe 'au ExitPre call delete("' .. fnameescape(getcwd() .. '/vimcmd') .. '")' + " Work around uneventful support for ":cquit". + exe printf("%s\n%s\n%s", + \ 'def s:DeleteVimcmdCopy()', + \ 'delete("' .. fnameescape(getcwd() .. '/vimcmd') .. '")', + \ 'enddef') +else + def s:DeleteVimcmdCopy() + enddef endif source util/screendump.vim @@ -87,6 +94,7 @@ exe 'cd ' .. fnameescape(syntaxDir) " MS-Windows the console only has 16 colors and the GUI can't run in a " terminal. if !CanRunVimInTerminal() + call s:DeleteVimcmdCopy() call Fatal('Cannot make screendumps, aborting') endif @@ -240,6 +248,7 @@ def s:TermWaitAndPollRuler(buf: number, in_name_and_out_name: string): list