To: vim_dev@googlegroups.com Subject: Patch 9.0.0296 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0296 Problem: Message in popup is shortened unnecessary. Solution: Do not use 'showcmd' and 'ruler' for a message in the popup. Set the timer when unhiding the message popup. Files: src/message.c, src/popupwin.c, src/testdir/test_messages.vim, src/testdir/dumps/Test_cmdheight_zero_4.dump *** ../vim-9.0.0295/src/message.c 2022-08-27 22:05:09.010962165 +0100 --- src/message.c 2022-08-28 14:34:13.591303747 +0100 *************** *** 206,212 **** && !exmode_active && msg_silent == 0) || force) { len = vim_strsize(s); ! if (msg_scrolled != 0) // Use all the columns. room = (int)(Rows - msg_row) * Columns - 1; else --- 206,216 ---- && !exmode_active && msg_silent == 0) || force) { len = vim_strsize(s); ! if (msg_scrolled != 0 ! #ifdef HAS_MESSAGE_WINDOW ! || use_message_window() ! #endif ! ) // Use all the columns. room = (int)(Rows - msg_row) * Columns - 1; else *************** *** 3719,3725 **** void msg_check(void) { ! if (msg_row == Rows - 1 && msg_col >= sc_col) { need_wait_return = TRUE; redraw_cmdline = TRUE; --- 3723,3733 ---- void msg_check(void) { ! if (msg_row == Rows - 1 && msg_col >= sc_col ! #ifdef HAS_MESSAGE_WINDOW ! && !use_message_window() ! #endif ! ) { need_wait_return = TRUE; redraw_cmdline = TRUE; *** ../vim-9.0.0295/src/popupwin.c 2022-08-28 13:02:23.955786926 +0100 --- src/popupwin.c 2022-08-28 14:31:06.399328568 +0100 *************** *** 4501,4507 **** popup_update_color(message_win, TYPE_MESSAGE_WIN); popup_show(message_win); } ! else if (message_win->w_popup_timer != NULL) timer_start(message_win->w_popup_timer); } } --- 4501,4507 ---- popup_update_color(message_win, TYPE_MESSAGE_WIN); popup_show(message_win); } ! if (message_win->w_popup_timer != NULL) timer_start(message_win->w_popup_timer); } } *** ../vim-9.0.0295/src/testdir/test_messages.vim 2022-08-28 13:02:23.955786926 +0100 --- src/testdir/test_messages.vim 2022-08-28 14:12:53.431244592 +0100 *************** *** 493,502 **** --- 493,522 ---- call term_sendkeys(buf, "\:echo 'message window'\") call VerifyScreenDump(buf, 'Test_cmdheight_zero_3', {}) + " Message for CTRL-C is in the popup window + "call term_sendkeys(buf, ":call popup_clear()\") + call term_sendkeys(buf, "\") + call VerifyScreenDump(buf, 'Test_cmdheight_zero_4', {}) + " clean up call StopVimInTerminal(buf) call delete('XtestCmdheight') endfunc + func Test_cmdheight_zero_shell() + CheckUnix + + set cmdheight=0 + set nomore + call setline(1, 'foo!') + silent !echo > Xfile.out + call assert_equal(['foo!'], readfile('Xfile.out')) + call delete('Xfile.out') + redraw! + + set more& + set cmdheight& + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-9.0.0295/src/testdir/dumps/Test_cmdheight_zero_4.dump 2022-08-28 14:38:57.751259262 +0100 --- src/testdir/dumps/Test_cmdheight_zero_4.dump 2022-08-28 14:37:37.359272505 +0100 *************** *** 0 **** --- 1,6 ---- + |s+0&#ffffff0|o|m|e| >t|e|x|t| @65 + |~+0#4040ff13&| @73 + |~| @73 + |~| @73 + |═+0#e000002&@74 + |T|y|p|e| @1|:|q|a|!| @1|a|n|d| |p|r|e|s@1| |<|E|n|t|e|r|>| |t|o| |a|b|a|n|d|o|n| |a|l@1| |c|h|a|n|g|e|s| |a|n|d| |e|x|i|t| |V|i|m| @9 *** ../vim-9.0.0295/src/version.c 2022-08-28 13:38:40.145369135 +0100 --- src/version.c 2022-08-28 14:05:36.830870578 +0100 *************** *** 709,710 **** --- 709,712 ---- { /* Add new patch number below this line */ + /**/ + 296, /**/ -- INSPECTOR END OF FILM: Move along. There's nothing to see! Keep moving! [Suddenly he notices the cameras.] INSPECTOR END OF FILM: (to Camera) All right, put that away sonny. [He walks over to it and puts his hand over the lens.] "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///