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/window.c b/src/window.c
index a810a6a..3e32b37 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5860,8 +5860,8 @@
     // loop until there is a 'winminheight' that is possible
     while (p_wmh > 0)
     {
-	room = Rows - p_ch - tabline_height();
-	needed = frame_minheight(topframe, NULL);
+	room = Rows - p_ch;
+	needed = min_rows() - 1;  // 1 was added for the cmdline
 	if (room >= needed)
 	    break;
 	--p_wmh;