patch 9.2.0884: scroll: unreachable 'smoothscroll' code in cursor_correct()
Commit:
https://github.com/vim/vim/commit/2ea497f072f102220a683822fd201bfb530894b2
Author: Hirohito Higashi <
h.eas...@gmail.com>
Date: Fri Jul 31 18:32:50 2026 +0000
patch 9.2.0884: scroll: unreachable 'smoothscroll' code in cursor_correct()
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) <
nor...@anthropic.com>
Signed-off-by: Hirohito Higashi <
h.eas...@gmail.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/move.c b/src/move.c
index 49bcfb7cc..9f9013424 100644
--- a/src/move.c
+++ b/src/move.c
@@ -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:
diff --git a/src/version.c b/src/version.c
index 56fbf8a76..29de0350f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 884,
/**/
883,
/**/