To: vim_dev@googlegroups.com Subject: Patch 9.0.1635 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1635 (after 9.0.1634) Problem: Error message is cleared when removing mode message. Solution: Also reset flags when the message is further down. Files: src/message.c, src/testdir/test_messages.vim, src/testdir/dumps/Test_message_not_cleared_after_mode_1.dump, src/testdir/dumps/Test_message_not_cleared_after_mode_2.dump, src/testdir/dumps/Test_message_not_cleared_after_mode_3.dump *** ../vim-9.0.1634/src/message.c 2023-06-15 16:39:42.597971058 +0100 --- src/message.c 2023-06-15 18:40:00.662742816 +0100 *************** *** 1643,1649 **** // When drawing over the command line no need to clear it later or remove // the mode message. ! if (msg_row == cmdline_row && msg_col == 0) { clear_cmdline = FALSE; mode_displayed = FALSE; --- 1643,1649 ---- // When drawing over the command line no need to clear it later or remove // the mode message. ! if (msg_row >= cmdline_row && msg_col == 0) { clear_cmdline = FALSE; mode_displayed = FALSE; *** ../vim-9.0.1634/src/testdir/test_messages.vim 2023-06-15 16:39:42.597971058 +0100 --- src/testdir/test_messages.vim 2023-06-15 18:37:32.130852605 +0100 *************** *** 347,353 **** endfunction set showmode set cmdheight=1 ! call setline(1, ['one', 'two', 'three']) END call writefile(lines, 'XmessageMode', 'D') let buf = RunVimInTerminal('-S XmessageMode', {'rows': 10}) --- 347,354 ---- endfunction set showmode set cmdheight=1 ! call test_settime(1) ! call setline(1, ['one', 'NoSuchFile', 'three']) END call writefile(lines, 'XmessageMode', 'D') let buf = RunVimInTerminal('-S XmessageMode', {'rows': 10}) *************** *** 361,366 **** --- 362,373 ---- call TermWait(buf) call VerifyScreenDump(buf, 'Test_message_not_cleared_after_mode_2', {}) + " removing the mode message used to also clear the error message + call term_sendkeys(buf, ":set cmdheight=2\") + call term_sendkeys(buf, '2GvEgf') + call TermWait(buf) + call VerifyScreenDump(buf, 'Test_message_not_cleared_after_mode_3', {}) + call StopVimInTerminal(buf) endfunc *** ../vim-9.0.1634/src/testdir/dumps/Test_message_not_cleared_after_mode_1.dump 2023-06-15 16:39:42.597971058 +0100 --- src/testdir/dumps/Test_message_not_cleared_after_mode_1.dump 2023-06-15 18:34:57.362930984 +0100 *************** *** 1,5 **** >o+0&#ffffff0|n|e| @71 ! |t|w|o| @71 |t|h|r|e@1| @69 |~+0#4040ff13&| @73 |~| @73 --- 1,5 ---- >o+0&#ffffff0|n|e| @71 ! |N|o|S|u|c|h|F|i|l|e| @64 |t|h|r|e@1| @69 |~+0#4040ff13&| @73 |~| @73 *** ../vim-9.0.1634/src/testdir/dumps/Test_message_not_cleared_after_mode_2.dump 2023-06-15 16:39:42.597971058 +0100 --- src/testdir/dumps/Test_message_not_cleared_after_mode_2.dump 2023-06-15 18:34:58.438930594 +0100 *************** *** 1,5 **** >o+0&#ffffff0|n|e| @71 ! |t|w|o| @71 |t|h|r|e@1| @69 |~+0#4040ff13&| @73 |~| @73 --- 1,5 ---- >o+0&#ffffff0|n|e| @71 ! |N|o|S|u|c|h|F|i|l|e| @64 |t|h|r|e@1| @69 |~+0#4040ff13&| @73 |~| @73 *** ../vim-9.0.1634/src/testdir/dumps/Test_message_not_cleared_after_mode_3.dump 2023-06-15 18:43:43.514532741 +0100 --- src/testdir/dumps/Test_message_not_cleared_after_mode_3.dump 2023-06-15 18:38:47.222800719 +0100 *************** *** 0 **** --- 1,10 ---- + |o+0&#ffffff0|n|e| @71 + |N|o|S|u|c|h|F|i|l>e| @64 + |t|h|r|e@1| @69 + |~+0#4040ff13&| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + | +0#0000000&@74 + |E+0#ffffff16#e000002|4@1|7|:| |C|a|n|'|t| |f|i|n|d| |f|i|l|e| |"|N|o|S|u|c|h|F|i|l|e|"| |i|n| |p|a|t|h| +0#0000000#ffffff0@14|2|,|1|0| @9|A|l@1| *** ../vim-9.0.1634/src/version.c 2023-06-15 16:39:42.597971058 +0100 --- src/version.c 2023-06-15 18:43:57.882517762 +0100 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1635, /**/ -- Rule #1: Don't give somebody a tool that he's going to hurt himself with. /// 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 ///