To: vim_dev@googlegroups.com Subject: Patch 8.2.2582 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2582 (after 8.2.2581) Problem: Vim9: screendump test fails on MS-Windows. Solution: Use :function instead of :def. Files: src/testdir/test_vim9_script.vim *** ../vim-8.2.2581/src/testdir/test_vim9_script.vim 2021-03-10 13:39:46.322350547 +0100 --- src/testdir/test_vim9_script.vim 2021-03-10 13:59:06.583625640 +0100 *************** *** 3339,3373 **** set cpo&vim enddef ! def Test_no_redraw_when_restoring_cpo() CheckScreendump ! var lines =<< trim END vim9script def script#func() enddef END ! mkdir('Xdir/autoload', 'p') ! writefile(lines, 'Xdir/autoload/script.vim') ! lines =<< trim END vim9script set cpo+=M exe 'set rtp^=' .. getcwd() .. '/Xdir' au CmdlineEnter : ++once timer_start(0, () => script#func()) setline(1, 'some text') END ! writefile(lines, 'XTest_redraw_cpo') ! var buf = RunVimInTerminal('-S XTest_redraw_cpo', {'rows': 6}) ! term_sendkeys(buf, "V:") ! VerifyScreenDump(buf, 'Test_vim9_no_redraw', {}) ! ! # clean up ! term_sendkeys(buf, "\u") ! StopVimInTerminal(buf) ! delete('XTest_redraw_cpo') ! delete('Xdir', 'rf') ! enddef def Test_unset_any_variable() --- 3339,3375 ---- set cpo&vim enddef ! " Use :function so we can use Check commands ! func Test_no_redraw_when_restoring_cpo() CheckScreendump + CheckFeature timers ! let lines =<< trim END vim9script def script#func() enddef END ! call mkdir('Xdir/autoload', 'p') ! call writefile(lines, 'Xdir/autoload/script.vim') ! let lines =<< trim END vim9script set cpo+=M exe 'set rtp^=' .. getcwd() .. '/Xdir' au CmdlineEnter : ++once timer_start(0, () => script#func()) setline(1, 'some text') END ! call writefile(lines, 'XTest_redraw_cpo') ! let buf = RunVimInTerminal('-S XTest_redraw_cpo', {'rows': 6}) ! call term_sendkeys(buf, "V:") ! call VerifyScreenDump(buf, 'Test_vim9_no_redraw', {}) ! ! " clean up ! call term_sendkeys(buf, "\u") ! call StopVimInTerminal(buf) ! call delete('XTest_redraw_cpo') ! call delete('Xdir', 'rf') ! endfunc def Test_unset_any_variable() *** ../vim-8.2.2581/src/version.c 2021-03-10 13:39:46.322350547 +0100 --- src/version.c 2021-03-10 13:59:59.883521268 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2582, /**/ -- "Lisp has all the visual appeal of oatmeal with nail clippings thrown in." -- Larry Wall /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///