Patch 9.0.0307
Problem:    :echomsg doesn't work properly with cmdheight=0.
Solution:   Improve scrolling and displaying.
Files:      src/ex_docmd.c, src/eval.c, src/testdir/test_messages.vim,
            src/testdir/dumps/Test_cmdheight_zero_6.dump,
            src/testdir/dumps/Test_cmdheight_zero_7.dump,
            src/testdir/dumps/Test_cmdheight_zero_8.dump


*** ../vim-9.0.0306/src/ex_docmd.c      2022-08-25 16:02:09.677816456 +0100
--- src/ex_docmd.c      2022-08-28 21:08:53.629759875 +0100
***************
*** 8370,8378 ****
      // After drawing the statusline screen_attr may still be set.
      screen_stop_highlight();
  
!     // Reset msg_didout, so that a message that's there is overwritten.
!     msg_didout = FALSE;
!     msg_col = 0;
  
      // No need to wait after an intentional redraw.
      need_wait_return = FALSE;
--- 8370,8383 ----
      // After drawing the statusline screen_attr may still be set.
      screen_stop_highlight();
  
! #ifdef HAS_MESSAGE_WINDOW
!     if (!use_message_window())  // append messages in the message window
! #endif
!     {
!       // Reset msg_didout, so that a message that's there is overwritten.
!       msg_didout = FALSE;
!       msg_col = 0;
!     }
  
      // No need to wait after an intentional redraw.
      need_wait_return = FALSE;
*** ../vim-9.0.0306/src/eval.c  2022-08-24 16:30:30.686752454 +0100
--- src/eval.c  2022-08-28 21:19:55.903291126 +0100
***************
*** 6824,6830 ****
--- 6824,6841 ----
  
      if (eap->skip)
        --emsg_skip;
+ #ifdef HAS_MESSAGE_WINDOW
+     if (use_message_window() && eap->cmdidx != CMD_execute)
+     {
+       // show the message window now
+       ex_redraw(eap);
  
+       // do not overwrite messages
+       msg_didout = TRUE;
+       if (msg_col == 0)
+           msg_col = 1;
+     }
+ #endif
      set_nextcmd(eap, arg);
  }
  
*** ../vim-9.0.0306/src/testdir/test_messages.vim       2022-08-28 
20:58:26.863665631 +0100
--- src/testdir/test_messages.vim       2022-08-28 21:27:24.317402882 +0100
***************
*** 478,483 ****
--- 478,490 ----
        set cmdheight=0
        set showmode
        call setline(1, 'some text')
+       func ShowMessages()
+         echomsg 'some text'
+         sleep 100m
+         echomsg 'some more text'
+         sleep 2500m
+         echomsg 'even more text'
+       endfunc
    END
    call writefile(lines, 'XtestCmdheight')
    let buf = RunVimInTerminal('-S XtestCmdheight', #{rows: 6})
***************
*** 501,506 ****
--- 508,521 ----
    call term_sendkeys(buf, ":w XsomeText\<CR>")
    call VerifyScreenDump(buf, 'Test_cmdheight_zero_5', {})
  
+   call term_sendkeys(buf, ":call popup_clear()\<CR>")
+   call VerifyScreenDump(buf, 'Test_cmdheight_zero_6', {})
+ 
+   call term_sendkeys(buf, ":call ShowMessages()\<CR>")
+   call VerifyScreenDump(buf, 'Test_cmdheight_zero_7', {})
+   sleep 2
+   call VerifyScreenDump(buf, 'Test_cmdheight_zero_8', {})
+ 
    " clean up
    call StopVimInTerminal(buf)
    call delete('XtestCmdheight')
*** ../vim-9.0.0306/src/testdir/dumps/Test_cmdheight_zero_6.dump        
2022-08-28 21:36:00.066088500 +0100
--- src/testdir/dumps/Test_cmdheight_zero_6.dump        2022-08-28 
21:28:10.509516816 +0100
***************
*** 0 ****
--- 1,6 ----
+ |s+0&#ffffff0|o|m|e| >t|e|x|t| @65
+ |~+0#4040ff13&| @73
+ |~| @73
+ |~| @73
+ |~| @73
+ |~| @73
*** ../vim-9.0.0306/src/testdir/dumps/Test_cmdheight_zero_7.dump        
2022-08-28 21:36:00.070088502 +0100
--- src/testdir/dumps/Test_cmdheight_zero_7.dump        2022-08-28 
21:28:11.661519484 +0100
***************
*** 0 ****
--- 1,6 ----
+ |s+0&#ffffff0|o|m|e| >t|e|x|t| @65
+ |~+0#4040ff13&| @73
+ |~| @73
+ |═+0#e000002&@74
+ |s|o|m|e| |t|e|x|t| @65
+ |s|o|m|e| |m|o|r|e| |t|e|x|t| @60
*** ../vim-9.0.0306/src/testdir/dumps/Test_cmdheight_zero_8.dump        
2022-08-28 21:36:00.078088503 +0100
--- src/testdir/dumps/Test_cmdheight_zero_8.dump        2022-08-28 
21:28:14.809526730 +0100
***************
*** 0 ****
--- 1,6 ----
+ |s+0&#ffffff0|o|m|e| >t|e|x|t| @65
+ |~+0#4040ff13&| @73
+ |═+0#e000002&@74
+ |s|o|m|e| |t|e|x|t| @65
+ |s|o|m|e| |m|o|r|e| |t|e|x|t| @60
+ |e|v|e|n| |m|o|r|e| |t|e|x|t| @60
*** ../vim-9.0.0306/src/version.c       2022-08-28 20:58:26.863665631 +0100
--- src/version.c       2022-08-28 21:31:36.821878662 +0100
***************
*** 709,710 ****
--- 709,712 ----
  {   /* Add new patch number below this line */
+ /**/
+     307,
  /**/

-- 
(letter from Mark to Mike, about the film's probable certificate)
      For an 'A' we would have to: Lose as many shits as possible; Take Jesus
      Christ out, if possible; Loose "I fart in your general direction"; Lose
      "the oral sex"; Lose "oh, fuck off"; Lose "We make castanets out of your
      testicles"
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220828203737.1C1481C07CD%40moolenaar.net.

Raspunde prin e-mail lui