Patch 8.2.3556
Problem:    Filler lines are incorrect for other window in diff mode after
            making a change.
Solution:   Copy filler lines from the current window. (closes #8809)
Files:      src/diff.c, src/testdir/test_diffmode.vim,
            src/testdir/dumps/Test_diff_scroll_change_03.dump


*** ../vim-8.2.3555/src/diff.c  2021-09-01 15:01:29.601137676 +0100
--- src/diff.c  2021-10-22 20:52:11.491483194 +0100
***************
*** 656,662 ****
  {
      win_T     *wp;
      win_T     *wp_other = NULL;
!     int               used_max_fill = FALSE;
      int               n;
  
      need_diff_redraw = FALSE;
--- 656,663 ----
  {
      win_T     *wp;
      win_T     *wp_other = NULL;
!     int               used_max_fill_other = FALSE;
!     int               used_max_fill_curwin = FALSE;
      int               n;
  
      need_diff_redraw = FALSE;
***************
*** 681,696 ****
                {
                    wp->w_topfill = n;
                    if (wp == curwin)
!                       used_max_fill = TRUE;
                }
                check_topfill(wp, FALSE);
            }
        }
  
!     if (wp_other != NULL && used_max_fill && curwin->w_p_scb)
!       // The current window was set to used the maximum number of filler
!       // lines, may need to reduce them.
!       diff_set_topline(wp_other, curwin);
  }
  
      static void
--- 682,706 ----
                {
                    wp->w_topfill = n;
                    if (wp == curwin)
!                       used_max_fill_curwin = TRUE;
!                   else if (wp_other != NULL)
!                       used_max_fill_other = TRUE;
                }
                check_topfill(wp, FALSE);
            }
        }
  
!     if (wp_other != NULL && curwin->w_p_scb)
!     {
!       if (used_max_fill_curwin)
!           // The current window was set to used the maximum number of filler
!           // lines, may need to reduce them.
!           diff_set_topline(wp_other, curwin);
!       else if (used_max_fill_other)
!           // The other window was set to used the maximum number of filler
!           // lines, may need to reduce them.
!           diff_set_topline(curwin, wp_other);
!     }
  }
  
      static void
*** ../vim-8.2.3555/src/testdir/test_diffmode.vim       2021-10-16 
13:00:10.940165406 +0100
--- src/testdir/test_diffmode.vim       2021-10-22 20:34:20.088978545 +0100
***************
*** 1013,1018 ****
--- 1013,1021 ----
    call term_sendkeys(buf, "ax\<Esc>")
    call VerifyScreenDump(buf, 'Test_diff_scroll_change_02', {})
  
+   call term_sendkeys(buf, "\<C-W>lay\<Esc>")
+   call VerifyScreenDump(buf, 'Test_diff_scroll_change_03', {})
+ 
    " clean up
    call StopVimInTerminal(buf)
    call delete('Xtest_scroll_change')
*** ../vim-8.2.3555/src/testdir/dumps/Test_diff_scroll_change_03.dump   
2021-10-22 20:56:21.726932815 +0100
--- src/testdir/dumps/Test_diff_scroll_change_03.dump   2021-10-22 
20:55:31.114234394 +0100
***************
*** 0 ****
--- 1,20 ----
+ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| 
+0#0000e05#a8a8a8255@1|6+0#0000000#5fd7ff255| @33
+ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| 
+0#0000e05#a8a8a8255@1|7+0#0000000#5fd7ff255| @33
+ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| 
+0#0000e05#a8a8a8255@1|8+0#0000000#5fd7ff255| @33
+ | +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33||+1&&| 
+0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33
+ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32||+1&&| 
+0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32
+ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0@1| @32||+1&&| 
+0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0@1| @32
+ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|2| @32||+1&&| 
+0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|2| @32
+ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|3| @32||+1&&| 
+0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|3| @32
+ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|4| @32||+1&&| 
+0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|4| @32
+ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|5|x+2&#ff404010| 
+0&#ffd7ff255@31||+1&#ffffff0| 
+0#0000e05#a8a8a8255@1|1+0#0000000#ffd7ff255|5>y+2&#ff404010| +0&#ffd7ff255@31
+ |~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |~| @35||+1#0000000&|~+0#4040ff13&| @35
+ |[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|7|,|3| @11|A|l@1| |[+3&&|N|o| 
|N|a|m|e|]| |[|+|]| @5|1|5|,|3| @10|B|o|t
+ | +0&&@74
*** ../vim-8.2.3555/src/version.c       2021-10-22 18:55:40.818752232 +0100
--- src/version.c       2021-10-22 20:55:16.354030772 +0100
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     3556,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
225. You sign up for free subscriptions for all the computer magazines

 /// 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/20211022195731.1CE8BC80054%40moolenaar.net.

Raspunde prin e-mail lui