changeset 21321:1421eca61db9 v8.2.1211

patch 8.2.1211: removed more than dead code Commit: https://github.com/vim/vim/commit/8455c5ed31c9cb2919f5e62693bab6b09bf60df2 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 14 21:22:30 2020 +0200 patch 8.2.1211: removed more than dead code Problem: Removed more than dead code. Solution: Put back the decrement.
author Bram Moolenaar <Bram@vim.org>
date Tue, 14 Jul 2020 21:30:05 +0200
parents 438b5a226cc7
children ade12c914e81
files src/move.c src/testdir/test_diffmode.vim src/version.c
diffstat 3 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/move.c
+++ b/src/move.c
@@ -2681,6 +2681,7 @@ halfpage(int flag, linenr_T Prenum)
 	    if (curwin->w_topfill > 0)
 	    {
 		i = 1;
+		--n;
 		--curwin->w_topfill;
 	    }
 	    else
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -1130,4 +1130,24 @@ func Test_diff_multilineconceal()
   redraw
 endfunc
 
+func Test_diff_and_scroll()
+  " this was causing an ml_get error
+  set ls=2
+  for i in range(winheight(0) * 2) 
+    call setline(i, i < winheight(0) - 10 ? i : i + 10) 
+  endfor
+  vnew
+  for i in range(winheight(0)*2 + 10) 
+    call setline(i, i < winheight(0) - 10 ? 0 : i) 
+  endfor
+  diffthis
+  wincmd p
+  diffthis
+  execute 'normal ' . winheight(0) . "\<C-d>"
+
+  bwipe!
+  bwipe!
+  set ls&
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1211,
+/**/
     1210,
 /**/
     1209,