]> granicus.if.org Git - vim/commitdiff
patch 9.0.0326: some changes for cmdheight=0 are not needed v9.0.0326
authorShougo Matsushita <Shougo.Matsu@gmail.com>
Tue, 30 Aug 2022 10:54:21 +0000 (11:54 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 30 Aug 2022 10:54:21 +0000 (11:54 +0100)
Problem:    Some changes for cmdheight=0 are not needed.
Solution:   Revert resize behavior if height is greater than the available
            space. (Shougo Matsushita, closes #11008)

src/version.c
src/window.c

index 5e1d931e9bca17dd949a35df0fec455e38b32598..505fe4fbef5a226214cf23a8edea35847f44ff88 100644 (file)
@@ -707,6 +707,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    326,
 /**/
     325,
 /**/
index 9c4a199836d5876a9ed9f76a995334f967cfeb19..7ea7b5b2ab364b3e48180e338b9f10cf99f0b0a8 100644 (file)
@@ -5694,10 +5694,8 @@ frame_setheight(frame_T *curfrp, int height)
        // topframe: can only change the command line height
        if (height > ROWS_AVAIL)
            // If height is greater than the available space, try to create
-           // space for the frame by reducing 'cmdheight' if possible, while
-           // making sure `cmdheight` doesn't go below 1.
-           height = MIN((p_ch > 0 ? ROWS_AVAIL + (p_ch - 1)
-                                                       : ROWS_AVAIL), height);
+           // space for the frame by reducing 'cmdheight' if possible.
+           height = ROWS_AVAIL;
        if (height > 0)
            frame_new_height(curfrp, height, FALSE, FALSE);
     }