]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0884: scroll: unreachable 'smoothscroll' code in cursor_correct() v9.2.0884
authorHirohito Higashi <h.east.727@gmail.com>
Fri, 31 Jul 2026 18:32:50 +0000 (18:32 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 31 Jul 2026 18:32:50 +0000 (18:32 +0000)
Problem:  cursor_correct() checks for 'smoothscroll' with 'wrap' off, a
          combination where 'smoothscroll' has no effect.
Solution: Remove the check, adjust_skipcol() already handles the case where
          the cursor line just fits in the window.

closes: #20891

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/move.c
src/version.c

index 49bcfb7cc5b5e90080bc524e3c1ea9aa316a3edc..9f90134249e762d8e941d33f8ea93bcdadc6e852 100644 (file)
@@ -3114,19 +3114,6 @@ cursor_correct(void)
            )
        return;
 
-    if (curwin->w_p_sms && !curwin->w_p_wrap)
-    {
-       // 'smoothscroll' is active
-       if (curwin->w_cline_height == curwin->w_height)
-       {
-           // The cursor line just fits in the window, don't scroll.
-           reset_skipcol();
-           return;
-       }
-       // TODO: If the cursor line doesn't fit in the window then only adjust
-       // w_skipcol.
-    }
-
     /*
      * Narrow down the area where the cursor can be put by taking lines from
      * the top and the bottom until:
index 56fbf8a76dadf8ef114458c88f917b813fa51738..29de0350fa210e39dbe37fc27aefa5d455d129aa 100644 (file)
@@ -758,6 +758,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    884,
 /**/
     883,
 /**/