mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.3774: test for command line height fails
Problem: Test for command line height fails. Solution: Use another way to handle window size change.
This commit is contained in:
@@ -3216,7 +3216,8 @@ struct tabpage_S
|
|||||||
win_T *tp_first_popupwin; // first popup window in this Tab page
|
win_T *tp_first_popupwin; // first popup window in this Tab page
|
||||||
#endif
|
#endif
|
||||||
long tp_old_Rows; // Rows when Tab page was left
|
long tp_old_Rows; // Rows when Tab page was left
|
||||||
long tp_old_Columns; // Columns when Tab page was left
|
long tp_old_Columns; // Columns when Tab page was left, -1 when
|
||||||
|
// calling shell_new_columns() postponed
|
||||||
long tp_ch_used; // value of 'cmdheight' when frame size
|
long tp_ch_used; // value of 'cmdheight' when frame size
|
||||||
// was set
|
// was set
|
||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
|
@@ -753,6 +753,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3774,
|
||||||
/**/
|
/**/
|
||||||
3773,
|
3773,
|
||||||
/**/
|
/**/
|
||||||
|
52
src/window.c
52
src/window.c
@@ -4192,7 +4192,8 @@ leave_tabpage(
|
|||||||
tp->tp_firstwin = firstwin;
|
tp->tp_firstwin = firstwin;
|
||||||
tp->tp_lastwin = lastwin;
|
tp->tp_lastwin = lastwin;
|
||||||
tp->tp_old_Rows = Rows;
|
tp->tp_old_Rows = Rows;
|
||||||
tp->tp_old_Columns = Columns;
|
if (tp->tp_old_Columns != -1)
|
||||||
|
tp->tp_old_Columns = Columns;
|
||||||
firstwin = NULL;
|
firstwin = NULL;
|
||||||
lastwin = NULL;
|
lastwin = NULL;
|
||||||
return OK;
|
return OK;
|
||||||
@@ -4255,8 +4256,16 @@ enter_tabpage(
|
|||||||
#endif
|
#endif
|
||||||
))
|
))
|
||||||
shell_new_rows();
|
shell_new_rows();
|
||||||
if (curtab->tp_old_Columns != Columns && starting == 0)
|
if (curtab->tp_old_Columns != Columns)
|
||||||
shell_new_columns(); // update window widths
|
{
|
||||||
|
if (starting == 0)
|
||||||
|
{
|
||||||
|
shell_new_columns(); // update window widths
|
||||||
|
curtab->tp_old_Columns = Columns;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
curtab->tp_old_Columns = -1; // update window widths later
|
||||||
|
}
|
||||||
|
|
||||||
lastused_tabpage = last_tab;
|
lastused_tabpage = last_tab;
|
||||||
|
|
||||||
@@ -5353,24 +5362,18 @@ win_free_lsize(win_T *wp)
|
|||||||
void
|
void
|
||||||
shell_new_rows(void)
|
shell_new_rows(void)
|
||||||
{
|
{
|
||||||
tabpage_T *tp;
|
int h = (int)ROWS_AVAIL;
|
||||||
|
|
||||||
if (firstwin == NULL) // not initialized yet
|
if (firstwin == NULL) // not initialized yet
|
||||||
return;
|
return;
|
||||||
|
if (h < frame_minheight(topframe, NULL))
|
||||||
|
h = frame_minheight(topframe, NULL);
|
||||||
|
|
||||||
FOR_ALL_TABPAGES(tp)
|
// First try setting the heights of windows with 'winfixheight'. If
|
||||||
{
|
// that doesn't result in the right height, forget about that option.
|
||||||
int h = (int)ROWS_AVAIL;
|
frame_new_height(topframe, h, FALSE, TRUE);
|
||||||
|
if (!frame_check_height(topframe, h))
|
||||||
if (h < frame_minheight(tp->tp_topframe, NULL))
|
frame_new_height(topframe, h, FALSE, FALSE);
|
||||||
h = frame_minheight(tp->tp_topframe, NULL);
|
|
||||||
|
|
||||||
// First try setting the heights of windows with 'winfixheight'. If
|
|
||||||
// that doesn't result in the right height, forget about that option.
|
|
||||||
frame_new_height(tp->tp_topframe, h, FALSE, TRUE);
|
|
||||||
if (!frame_check_height(tp->tp_topframe, h))
|
|
||||||
frame_new_height(tp->tp_topframe, h, FALSE, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
(void)win_comp_pos(); // recompute w_winrow and w_wincol
|
(void)win_comp_pos(); // recompute w_winrow and w_wincol
|
||||||
compute_cmdrow();
|
compute_cmdrow();
|
||||||
@@ -5389,19 +5392,14 @@ shell_new_rows(void)
|
|||||||
void
|
void
|
||||||
shell_new_columns(void)
|
shell_new_columns(void)
|
||||||
{
|
{
|
||||||
tabpage_T *tp;
|
|
||||||
|
|
||||||
if (firstwin == NULL) // not initialized yet
|
if (firstwin == NULL) // not initialized yet
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FOR_ALL_TABPAGES(tp)
|
// First try setting the widths of windows with 'winfixwidth'. If that
|
||||||
{
|
// doesn't result in the right width, forget about that option.
|
||||||
// First try setting the widths of windows with 'winfixwidth'. If that
|
frame_new_width(topframe, (int)Columns, FALSE, TRUE);
|
||||||
// doesn't result in the right width, forget about that option.
|
if (!frame_check_width(topframe, Columns))
|
||||||
frame_new_width(tp->tp_topframe, (int)Columns, FALSE, TRUE);
|
frame_new_width(topframe, (int)Columns, FALSE, FALSE);
|
||||||
if (!frame_check_width(tp->tp_topframe, Columns))
|
|
||||||
frame_new_width(tp->tp_topframe, (int)Columns, FALSE, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
(void)win_comp_pos(); // recompute w_winrow and w_wincol
|
(void)win_comp_pos(); // recompute w_winrow and w_wincol
|
||||||
#if 0
|
#if 0
|
||||||
|
Reference in New Issue
Block a user