comparison src/window.c @ 29976:b6b71499d9af v9.0.0326

patch 9.0.0326: some changes for cmdheight=0 are not needed Commit: https://github.com/vim/vim/commit/0e412be00f8290e0575c7f72ec080725631eff38 Author: Shougo Matsushita <Shougo.Matsu@gmail.com> Date: Tue Aug 30 11:54:21 2022 +0100 patch 9.0.0326: some changes for cmdheight=0 are not needed 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)
author Bram Moolenaar <Bram@vim.org>
date Tue, 30 Aug 2022 13:00:05 +0200
parents 27cb0eed6aef
children bb0e525e1393
comparison
equal deleted inserted replaced
29975:5f4b418b34a9 29976:b6b71499d9af
5692 if (curfrp->fr_parent == NULL) 5692 if (curfrp->fr_parent == NULL)
5693 { 5693 {
5694 // topframe: can only change the command line height 5694 // topframe: can only change the command line height
5695 if (height > ROWS_AVAIL) 5695 if (height > ROWS_AVAIL)
5696 // If height is greater than the available space, try to create 5696 // If height is greater than the available space, try to create
5697 // space for the frame by reducing 'cmdheight' if possible, while 5697 // space for the frame by reducing 'cmdheight' if possible.
5698 // making sure `cmdheight` doesn't go below 1. 5698 height = ROWS_AVAIL;
5699 height = MIN((p_ch > 0 ? ROWS_AVAIL + (p_ch - 1)
5700 : ROWS_AVAIL), height);
5701 if (height > 0) 5699 if (height > 0)
5702 frame_new_height(curfrp, height, FALSE, FALSE); 5700 frame_new_height(curfrp, height, FALSE, FALSE);
5703 } 5701 }
5704 else if (curfrp->fr_parent->fr_layout == FR_ROW) 5702 else if (curfrp->fr_parent->fr_layout == FR_ROW)
5705 { 5703 {