comparison src/window.c @ 30671:15ac28c12c8f v9.0.0670

patch 9.0.0670: no space for command line when there is a tabline Commit: https://github.com/vim/vim/commit/c9f5f73206272ccad0aa536854debc5f9781978a Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 6 11:39:06 2022 +0100 patch 9.0.0670: no space for command line when there is a tabline Problem: No space for command line when there is a tabline. Solution: Correct computation of where the command line should be. (closes #11295)
author Bram Moolenaar <Bram@vim.org>
date Thu, 06 Oct 2022 12:45:05 +0200
parents fe0a18141c3c
children b9cc46461994
comparison
equal deleted inserted replaced
30670:069c5155439b 30671:15ac28c12c8f
4330 p_ch = curtab->tp_ch_used; 4330 p_ch = curtab->tp_ch_used;
4331 4331
4332 // When cmdheight is changed in a tab page with '<C-w>-', cmdline_row is 4332 // When cmdheight is changed in a tab page with '<C-w>-', cmdline_row is
4333 // changed but p_ch and tp_ch_used are not changed. Thus we also need to 4333 // changed but p_ch and tp_ch_used are not changed. Thus we also need to
4334 // check cmdline_row. 4334 // check cmdline_row.
4335 if ((row < cmdline_row) && (cmdline_row <= Rows - p_ch)) 4335 if (row < cmdline_row && cmdline_row <= Rows - p_ch)
4336 clear_cmdline = TRUE; 4336 clear_cmdline = TRUE;
4337 4337
4338 // The tabpage line may have appeared or disappeared, may need to resize 4338 // The tabpage line may have appeared or disappeared, may need to resize
4339 // the frames for that. When the Vim window was resized need to update 4339 // the frames for that. When the Vim window was resized need to update
4340 // frame sizes too. 4340 // frame sizes too.
6663 // is nothing to do (window size must have decreased). 6663 // is nothing to do (window size must have decreased).
6664 if (p_ch > old_p_ch && cmdline_row <= Rows - p_ch) 6664 if (p_ch > old_p_ch && cmdline_row <= Rows - p_ch)
6665 return; 6665 return;
6666 6666
6667 // Update cmdline_row to what it should be: just below the last window. 6667 // Update cmdline_row to what it should be: just below the last window.
6668 cmdline_row = topframe->fr_height; 6668 cmdline_row = topframe->fr_height + tabline_height();
6669 6669
6670 // If cmdline_row is smaller than what it is supposed to be for 'cmdheight' 6670 // If cmdline_row is smaller than what it is supposed to be for 'cmdheight'
6671 // then set old_p_ch to what it would be, so that the windows get resized 6671 // then set old_p_ch to what it would be, so that the windows get resized
6672 // properly for the new value. 6672 // properly for the new value.
6673 if (cmdline_row < Rows - p_ch) 6673 if (cmdline_row < Rows - p_ch)