To: vim_dev@googlegroups.com Subject: Patch 8.0.1653 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1653 Problem: Screen dump is made too soon. Solution: Wait until the ruler is displayed. (Ozaki Kiichi, closes #2755) Files: src/testdir/dumps/Test_popup_command_01.dump, src/testdir/dumps/Test_popup_command_02.dump, src/testdir/screendump.vim, src/testdir/test_autocmd.vim, src/testdir/test_terminal.vim *** ../vim-8.0.1652/src/testdir/dumps/Test_popup_command_01.dump 2018-03-06 13:22:42.815870215 +0100 --- src/testdir/dumps/Test_popup_command_01.dump 2018-03-29 17:34:46.441197247 +0200 *************** *** 1,5 **** |o+0&#ffffff0|n|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e| @51 ! |a|n|d| |o|n|e| |t|w|o| |X|t|h|r|e@1| |f|o|u|r| |f|i|v|e| @46 |o|n|e| |m|o|r|e| |t|w| +0#0000001#ffd7ff255|U|n|d|o| @12| +0#0000000#ffffff0@45 |~+0#4040ff13&| @9| +0#0000001#ffd7ff255@17| +0#4040ff13#ffffff0@45 |~| @9| +0#0000001#ffd7ff255|P|a|s|t|e| @11| +0#4040ff13#ffffff0@45 --- 1,5 ---- |o+0&#ffffff0|n|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e| @51 ! |a|n|d| |o|n|e| |t|w|o| >X|t|h|r|e@1| |f|o|u|r| |f|i|v|e| @46 |o|n|e| |m|o|r|e| |t|w| +0#0000001#ffd7ff255|U|n|d|o| @12| +0#0000000#ffffff0@45 |~+0#4040ff13&| @9| +0#0000001#ffd7ff255@17| +0#4040ff13#ffffff0@45 |~| @9| +0#0000001#ffd7ff255|P|a|s|t|e| @11| +0#4040ff13#ffffff0@45 *************** *** 17,20 **** |~| @73 |~| @73 |~| @73 ! |:+0#0000000&|p|o|p|u|p| |P|o|p|U|p| @34|:| @8> @17 --- 17,20 ---- |~| @73 |~| @73 |~| @73 ! |:+0#0000000&|p|o|p|u|p| |P|o|p|U|p| @62 *** ../vim-8.0.1652/src/testdir/dumps/Test_popup_command_02.dump 2018-03-06 13:22:42.815870215 +0100 --- src/testdir/dumps/Test_popup_command_02.dump 2018-03-29 17:34:46.441197247 +0200 *************** *** 17,20 **** |~| @73 |~| @73 |~| @73 ! |:+0#0000000&|p|o|p|u|p| |P|o|p|U|p| @34|:| @8| @17 --- 17,20 ---- |~| @73 |~| @73 |~| @73 ! |:+0#0000000&|p|o|p|u|p| |P|o|p|U|p| @62 *** ../vim-8.0.1652/src/testdir/screendump.vim 2018-03-25 20:31:28.964620010 +0200 --- src/testdir/screendump.vim 2018-03-29 17:34:46.441197247 +0200 *************** *** 59,64 **** --- 59,67 ---- let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': cols}) call assert_equal([rows, cols], term_getsize(buf)) + " Wait for the ruler (in the status line) to be shown. + call WaitFor({-> len(term_getline(buf, rows)) >= cols - 1}) + return buf endfunc *** ../vim-8.0.1652/src/testdir/test_autocmd.vim 2018-03-23 22:39:27.321233962 +0100 --- src/testdir/test_autocmd.vim 2018-03-29 17:34:46.441197247 +0200 *************** *** 1315,1320 **** --- 1315,1322 ---- call writefile([''], 'Xchanged.txt') let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': 3}) call assert_equal('running', term_getstatus(buf)) + " Wait for the ruler (in the status line) to be shown. + call WaitFor({-> term_getline(buf, 3) =~# '\ call writefile(['No'], 'Xchanged.txt')\") call term_sendkeys(buf, "\\:qa!\") *** ../vim-8.0.1652/src/testdir/test_terminal.vim 2018-03-29 17:22:19.892974695 +0200 --- src/testdir/test_terminal.vim 2018-03-29 17:34:46.445197228 +0200 *************** *** 975,981 **** func Check_dump01(off) call assert_equal('one two three four five', trim(getline(a:off + 1))) call assert_equal('~ Select Word', trim(getline(a:off + 7))) ! call assert_equal(':popup PopUp :', trim(getline(a:off + 20))) endfunc func Test_terminal_dumpwrite_composing() --- 975,981 ---- func Check_dump01(off) call assert_equal('one two three four five', trim(getline(a:off + 1))) call assert_equal('~ Select Word', trim(getline(a:off + 7))) ! call assert_equal(':popup PopUp', trim(getline(a:off + 20))) endfunc func Test_terminal_dumpwrite_composing() *** ../vim-8.0.1652/src/version.c 2018-03-29 17:22:19.896974675 +0200 --- src/version.c 2018-03-29 17:35:52.260867479 +0200 *************** *** 764,765 **** --- 764,767 ---- { /* Add new patch number below this line */ + /**/ + 1653, /**/ -- From "know your smileys": :-) Funny |-) Funny Oriental (-: Funny Australian /// 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 ///