To: vim_dev@googlegroups.com Subject: Patch 9.0.0512 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0512 Problem: Cannot redraw the status lines when editing a command. Solution: Only postpone the redraw when messages have scrolled. (closes #11170) Files: src/ex_docmd.c, src/testdir/test_cmdline.vim, src/testdir/dumps/Test_redrawstatus_in_autocmd_1.dump, src/testdir/dumps/Test_redrawstatus_in_autocmd_2.dump *** ../vim-9.0.0511/src/ex_docmd.c 2022-09-19 21:15:52.085717048 +0100 --- src/ex_docmd.c 2022-09-20 13:09:34.649221577 +0100 *************** *** 8431,8437 **** status_redraw_all(); else status_redraw_curbuf(); ! if (State & MODE_CMDLINE) return; // redraw later RedrawingDisabled = 0; --- 8431,8437 ---- status_redraw_all(); else status_redraw_curbuf(); ! if (msg_scrolled) return; // redraw later RedrawingDisabled = 0; *** ../vim-9.0.0511/src/testdir/test_cmdline.vim 2022-09-19 21:15:52.085717048 +0100 --- src/testdir/test_cmdline.vim 2022-09-20 13:09:34.649221577 +0100 *************** *** 214,228 **** CheckScreendump let lines =<< trim END ! set cmdheight=2 autocmd CmdlineChanged * if getcmdline() == 'foobar' | redrawstatus | endif END call writefile(lines, 'XTest_redrawstatus', 'D') let buf = RunVimInTerminal('-S XTest_redrawstatus', {'rows': 8}) call term_sendkeys(buf, ":echo \"one\\ntwo\\nthree\\nfour\"\") call term_sendkeys(buf, ":foobar") call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_1', {}) " clean up call term_sendkeys(buf, "\") --- 214,233 ---- CheckScreendump let lines =<< trim END ! set laststatus=2 ! set statusline=%=:%{getcmdline()} autocmd CmdlineChanged * if getcmdline() == 'foobar' | redrawstatus | endif END call writefile(lines, 'XTest_redrawstatus', 'D') let buf = RunVimInTerminal('-S XTest_redrawstatus', {'rows': 8}) + " :redrawstatus is postponed if messages have scrolled call term_sendkeys(buf, ":echo \"one\\ntwo\\nthree\\nfour\"\") call term_sendkeys(buf, ":foobar") call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_1', {}) + " it is not postponed if messages have not scrolled + call term_sendkeys(buf, "\:foobar") + call VerifyScreenDump(buf, 'Test_redrawstatus_in_autocmd_2', {}) " clean up call term_sendkeys(buf, "\") *** ../vim-9.0.0511/src/testdir/dumps/Test_redrawstatus_in_autocmd_1.dump 2022-09-19 21:15:52.085717048 +0100 --- src/testdir/dumps/Test_redrawstatus_in_autocmd_1.dump 2022-09-20 13:09:34.649221577 +0100 *************** *** 1,7 **** |~+0#4040ff13#ffffff0| @73 |~| @73 ! |~| @73 ! |o+0#0000000&|n|e| @71 |t|w|o| @71 |t|h|r|e@1| @69 |f|o|u|r| @70 --- 1,7 ---- |~+0#4040ff13#ffffff0| @73 |~| @73 ! | +3#0000000&@73|: ! |o+0&&|n|e| @71 |t|w|o| @71 |t|h|r|e@1| @69 |f|o|u|r| @70 *** ../vim-9.0.0511/src/testdir/dumps/Test_redrawstatus_in_autocmd_2.dump 2022-09-20 13:16:20.472460523 +0100 --- src/testdir/dumps/Test_redrawstatus_in_autocmd_2.dump 2022-09-20 13:09:34.649221577 +0100 *************** *** 0 **** --- 1,8 ---- + | +0&#ffffff0@74 + |~+0#4040ff13&| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + | +3#0000000&@67|:|f|o@1|b|a|r + |:+0&&|f|o@1|b|a|r> @67 *** ../vim-9.0.0511/src/version.c 2022-09-20 12:45:11.848336408 +0100 --- src/version.c 2022-09-20 13:16:28.744444091 +0100 *************** *** 701,702 **** --- 701,704 ---- { /* Add new patch number below this line */ + /**/ + 512, /**/ -- hundred-and-one symptoms of being an internet addict: 105. When someone asks you for your address, you tell them your URL. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///