Patch 8.2.2595
Problem:    Setting 'winminheight' may cause 'lines' to change.
Solution:   Also take minimal height of other tabpages into account. (#7899)
Files:      src/window.c, src/testdir/test_options.vim


*** ../vim-8.2.2594/src/window.c        2021-03-01 21:02:42.686928992 +0100
--- src/window.c        2021-03-13 14:28:23.975641714 +0100
***************
*** 5860,5867 ****
      // loop until there is a 'winminheight' that is possible
      while (p_wmh > 0)
      {
!       room = Rows - p_ch - tabline_height();
!       needed = frame_minheight(topframe, NULL);
        if (room >= needed)
            break;
        --p_wmh;
--- 5860,5867 ----
      // loop until there is a 'winminheight' that is possible
      while (p_wmh > 0)
      {
!       room = Rows - p_ch;
!       needed = min_rows() - 1;  // 1 was added for the cmdline
        if (room >= needed)
            break;
        --p_wmh;
*** ../vim-8.2.2594/src/testdir/test_options.vim        2021-03-01 
21:02:42.686928992 +0100
--- src/testdir/test_options.vim        2021-03-13 14:26:12.123805687 +0100
***************
*** 1035,1040 ****
--- 1035,1061 ----
    call delete('Xwinminheight')
  endfunc
  
+ func Test_opt_winminheight_term_tabs()
+   CheckRunVimInTerminal
+ 
+   " The tabline should be taken into account.
+   let lines =<< trim END
+     set wmh=0 stal=2
+     split
+     split
+     split
+     split
+     tabnew
+   END
+   call writefile(lines, 'Xwinminheight')
+   let buf = RunVimInTerminal('-S Xwinminheight', #{rows: 11})
+   call term_sendkeys(buf, ":set wmh=1\n")
+   call WaitForAssert({-> assert_match('E36: Not enough room', 
term_getline(buf, 11))})
+ 
+   call StopVimInTerminal(buf)
+   call delete('Xwinminheight')
+ endfunc
+ 
  " Test for the 'winminwidth' option
  func Test_opt_winminwidth()
    only!
*** ../vim-8.2.2594/src/version.c       2021-03-13 13:52:29.813470884 +0100
--- src/version.c       2021-03-13 14:21:46.308061985 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2595,
  /**/

-- 
BEDEVERE:        Why do you think she is a witch?
SECOND VILLAGER: She turned me into a newt.
BEDEVERE:        A newt?
SECOND VILLAGER: (After looking at himself for some time) I got better.
                 "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/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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/202103131329.12DDTbUS4171263%40masaka.moolenaar.net.

Raspunde prin e-mail lui