To: vim_dev@googlegroups.com Subject: Patch 8.2.0333 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0333 Problem: Terminal in popup test is flaky. Solution: Make sure redraw is done before opening the popup. Files: src/testdir/test_terminal.vim, src/testdir/dumps/Test_terminal_popup_1.dump *** ../vim-8.2.0332/src/testdir/test_terminal.vim 2020-02-28 22:19:38.314023342 +0100 --- src/testdir/test_terminal.vim 2020-02-29 15:06:32.677601320 +0100 *************** *** 2339,2367 **** \ 'hi PopTerm ctermbg=grey', \ 'func OpenTerm(setColor)', \ " let s:buf = term_start('" .. cmd .. " Xtext', #{hidden: 1, term_finish: 'close'})", ! \ ' let s:winid = popup_create(s:buf, #{minwidth: 45, minheight: 7, border: [], drag: 1, resize: 1})', \ ' if a:setColor', ! \ ' call win_execute(s:winid, "set wincolor=PopTerm")', \ ' endif', \ 'endfunc', - \ 'call OpenTerm(0)', \ 'func HidePopup()', ! \ ' call popup_hide(s:winid)', \ 'endfunc', \ 'func ClosePopup()', ! \ ' call popup_close(s:winid)', \ 'endfunc', \ 'func ReopenPopup()', \ ' call popup_create(s:buf, #{minwidth: 40, minheight: 6, border: []})', \ 'endfunc', - \ 'sleep 10m', - \ 'redraw', - \ 'echo getwinvar(s:winid, "&buftype") win_gettype(s:winid)', \ ] call writefile(lines, 'XtermPopup') let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15}) call term_wait(buf, 100) call term_sendkeys(buf, ":\") call VerifyScreenDump(buf, 'Test_terminal_popup_1', {}) call term_sendkeys(buf, ":q\") --- 2339,2366 ---- \ 'hi PopTerm ctermbg=grey', \ 'func OpenTerm(setColor)', \ " let s:buf = term_start('" .. cmd .. " Xtext', #{hidden: 1, term_finish: 'close'})", ! \ ' let g:winid = popup_create(s:buf, #{minwidth: 45, minheight: 7, border: [], drag: 1, resize: 1})', \ ' if a:setColor', ! \ ' call win_execute(g:winid, "set wincolor=PopTerm")', \ ' endif', \ 'endfunc', \ 'func HidePopup()', ! \ ' call popup_hide(g:winid)', \ 'endfunc', \ 'func ClosePopup()', ! \ ' call popup_close(g:winid)', \ 'endfunc', \ 'func ReopenPopup()', \ ' call popup_create(s:buf, #{minwidth: 40, minheight: 6, border: []})', \ 'endfunc', \ ] call writefile(lines, 'XtermPopup') let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15}) call term_wait(buf, 100) + call term_sendkeys(buf, ":call OpenTerm(0)\") + call term_wait(buf, 100) call term_sendkeys(buf, ":\") + call term_sendkeys(buf, "\:echo getwinvar(g:winid, \"&buftype\") win_gettype(g:winid)\") call VerifyScreenDump(buf, 'Test_terminal_popup_1', {}) call term_sendkeys(buf, ":q\") *** ../vim-8.2.0332/src/testdir/dumps/Test_terminal_popup_1.dump 2020-02-14 17:05:12.472074109 +0100 --- src/testdir/dumps/Test_terminal_popup_1.dump 2020-02-29 15:06:39.217578403 +0100 *************** *** 12,15 **** |1@1| @11|╚+0#0000001#ffd7ff255|═@44|⇲| +0#0000000#ffffff0@13 |1|2| @72 |1|3| @72 ! |t|e|r|m|i|n|a|l| |p|o|p|u|p| @42|0|,|0|-|1| @8|A|l@1| --- 12,15 ---- |1@1| @11|╚+0#0000001#ffd7ff255|═@44|⇲| +0#0000000#ffffff0@13 |1|2| @72 |1|3| @72 ! |t|e|r|m|i|n|a|l| |p|o|p|u|p| @42|1|,|1| @10|T|o|p| *** ../vim-8.2.0332/src/version.c 2020-02-29 14:23:54.753706663 +0100 --- src/version.c 2020-02-29 15:09:02.285083211 +0100 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 333, /**/ -- Birthdays are healthy. The more you have them, the longer you live. /// 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 ///