patch 9.0.1435: scrolling too many lines when 'wrap' and 'diff' are set
Problem: Scrolling too many lines when 'wrap' and 'diff' are set.
Solution: Only scroll by screenlines for 'diff' when 'wrap' is not set.
(closes #12211)
diff --git a/src/move.c b/src/move.c
index e8b86ca..77d8b5f 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1763,7 +1763,7 @@
|| (byfold && hasAnyFolding(curwin))
# endif
# ifdef FEAT_DIFF
- || curwin->w_p_diff
+ || (curwin->w_p_diff && !curwin->w_p_wrap)
# endif
;
}
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index d9ffbb3..d60de50 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
Binary files differ
diff --git a/src/version.c b/src/version.c
index f87bc34..547d6a7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1435,
+/**/
1434,
/**/
1433,