patch 8.2.2595: setting 'winminheight' may cause 'lines' to change

Problem:    Setting 'winminheight' may cause 'lines' to change.
Solution:   Also take minimal height of other tabpages into account. (#7899)
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim
index 2595392..54042d4 100644
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -1035,6 +1035,27 @@
   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!