Patch 8.2.0580
Problem:    Window size wrong if 'ea' is off and 'splitright' is on and
            splitting then closing a window.
Solution:   Put abandoned window space in the right place. (Mark Waggoner)
Files:      src/testdir/test_winbuf_close.vim, src/window.c


*** ../vim-8.2.0579/src/testdir/test_winbuf_close.vim   2020-01-20 
21:44:28.427348596 +0100
--- src/testdir/test_winbuf_close.vim   2020-04-15 19:40:24.963918692 +0200
***************
*** 194,196 ****
--- 194,215 ----
    call assert_true(v:true)
    %bwipe!
  endfunc
+ 
+ " Test when closing a split window (above/below) restores space to the window
+ " below when 'noequalalways' and 'splitright' are set.
+ func Test_window_close_splitright_noequalalways()
+   set noequalalways
+   set splitright
+   new
+   let w1 = win_getid()
+   new
+   let w2 = win_getid()
+   execute "normal \<c-w>b"
+   let h = winheight(0)
+   let w = win_getid()
+   new 
+   q
+   call assert_equal(h, winheight(0), "Window height does not match eight 
before opening and closing another window")
+   call assert_equal(w, win_getid(), "Did not return to original window after 
opening and closing a window")
+ endfunc
+ 
*** ../vim-8.2.0579/src/window.c        2020-04-02 18:50:42.431773081 +0200
--- src/window.c        2020-04-15 19:43:10.355494918 +0200
***************
*** 2967,2975 ****
      if (frp->fr_next == NULL)
        return frp->fr_prev;
  
      target_fr = frp->fr_next;
      other_fr  = frp->fr_prev;
!     if (p_spr || p_sb)
      {
        target_fr = frp->fr_prev;
        other_fr  = frp->fr_next;
--- 2967,2988 ----
      if (frp->fr_next == NULL)
        return frp->fr_prev;
  
+     // By default the next window will get the space that was abandoned by 
this
+     // window
      target_fr = frp->fr_next;
      other_fr  = frp->fr_prev;
! 
!     // If this is part of a column of windows and 'splitbelow' is true then 
the
!     // previous window will get the space.
!     if (frp->fr_parent != NULL && frp->fr_parent->fr_layout == FR_COL && p_sb)
!     {
!       target_fr = frp->fr_prev;
!       other_fr  = frp->fr_next;
!     }
! 
!     // If this is part of a row of windows, and 'splitright' is true then the
!     // previous window will get the space.
!     if (frp->fr_parent != NULL && frp->fr_parent->fr_layout == FR_ROW && 
p_spr)
      {
        target_fr = frp->fr_prev;
        other_fr  = frp->fr_next;
*** ../vim-8.2.0579/src/version.c       2020-04-14 20:56:27.589970249 +0200
--- src/version.c       2020-04-15 20:05:29.924090433 +0200
***************
*** 748,749 ****
--- 748,751 ----
  {   /* Add new patch number below this line */
+ /**/
+     580,
  /**/

-- 
ARTHUR:    Be quiet!  I order you to shut up.
OLD WOMAN: Order, eh -- who does he think he is?
ARTHUR:    I am your king!
OLD WOMAN: Well, I didn't vote for you.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202004151806.03FI6EjF001313%40masaka.moolenaar.net.

Raspunde prin e-mail lui