Patch 8.2.3774 (after 8.2.3773)
Problem:    Test for command line height fails.
Solution:   Use another way to handle window size change.
Files:      src/structs.h, src/window.c


*** ../vim-8.2.3773/src/structs.h       2021-12-10 10:37:30.855830802 +0000
--- src/structs.h       2021-12-10 13:32:44.269169085 +0000
***************
*** 3216,3222 ****
      win_T         *tp_first_popupwin; // first popup window in this Tab page
  #endif
      long          tp_old_Rows;    // Rows when Tab page was left
!     long          tp_old_Columns; // Columns when Tab page was left
      long          tp_ch_used;     // value of 'cmdheight' when frame size
                                    // was set
  #ifdef FEAT_GUI
--- 3216,3223 ----
      win_T         *tp_first_popupwin; // first popup window in this Tab page
  #endif
      long          tp_old_Rows;    // Rows 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
                                    // was set
  #ifdef FEAT_GUI
*** ../vim-8.2.3773/src/window.c        2021-12-10 12:11:06.091631884 +0000
--- src/window.c        2021-12-10 13:38:46.428379834 +0000
***************
*** 4192,4198 ****
      tp->tp_firstwin = firstwin;
      tp->tp_lastwin = lastwin;
      tp->tp_old_Rows = Rows;
!     tp->tp_old_Columns = Columns;
      firstwin = NULL;
      lastwin = NULL;
      return OK;
--- 4192,4199 ----
      tp->tp_firstwin = firstwin;
      tp->tp_lastwin = lastwin;
      tp->tp_old_Rows = Rows;
!     if (tp->tp_old_Columns != -1)
!       tp->tp_old_Columns = Columns;
      firstwin = NULL;
      lastwin = NULL;
      return OK;
***************
*** 4255,4262 ****
  #endif
                ))
        shell_new_rows();
!     if (curtab->tp_old_Columns != Columns && starting == 0)
!       shell_new_columns();    // update window widths
  
      lastused_tabpage = last_tab;
  
--- 4256,4271 ----
  #endif
                ))
        shell_new_rows();
!     if (curtab->tp_old_Columns != Columns)
!     {
!       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;
  
***************
*** 5353,5376 ****
      void
  shell_new_rows(void)
  {
!     tabpage_T *tp;
  
      if (firstwin == NULL)     // not initialized yet
        return;
  
!     FOR_ALL_TABPAGES(tp)
!     {
!       int             h = (int)ROWS_AVAIL;
! 
!       if (h < frame_minheight(tp->tp_topframe, NULL))
!           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
      compute_cmdrow();
--- 5362,5379 ----
      void
  shell_new_rows(void)
  {
!     int               h = (int)ROWS_AVAIL;
  
      if (firstwin == NULL)     // not initialized yet
        return;
+     if (h < frame_minheight(topframe, NULL))
+       h = frame_minheight(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(topframe, h, FALSE, TRUE);
!     if (!frame_check_height(topframe, h))
!       frame_new_height(topframe, h, FALSE, FALSE);
  
      (void)win_comp_pos();             // recompute w_winrow and w_wincol
      compute_cmdrow();
***************
*** 5389,5407 ****
      void
  shell_new_columns(void)
  {
-     tabpage_T *tp;
- 
      if (firstwin == NULL)     // not initialized yet
        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.
!       frame_new_width(tp->tp_topframe, (int)Columns, FALSE, TRUE);
!       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
  #if 0
--- 5392,5405 ----
      void
  shell_new_columns(void)
  {
      if (firstwin == NULL)     // not initialized yet
        return;
  
!     // First try setting the widths of windows with 'winfixwidth'.  If that
!     // doesn't result in the right width, forget about that option.
!     frame_new_width(topframe, (int)Columns, FALSE, TRUE);
!     if (!frame_check_width(topframe, Columns))
!       frame_new_width(topframe, (int)Columns, FALSE, FALSE);
  
      (void)win_comp_pos();             // recompute w_winrow and w_wincol
  #if 0
*** ../vim-8.2.3773/src/version.c       2021-12-10 12:11:06.091631884 +0000
--- src/version.c       2021-12-10 13:29:49.177570209 +0000
***************
*** 755,756 ****
--- 755,758 ----
  {   /* Add new patch number below this line */
+ /**/
+     3774,
  /**/

-- 
Don't Panic!
                -- The Hitchhiker's Guide to the Galaxy

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211210134048.68AD91C09BB%40moolenaar.net.

Raspunde prin e-mail lui