From: Hirohito Higashi Date: Fri, 31 Jul 2026 18:32:50 +0000 (+0000) Subject: patch 9.2.0884: scroll: unreachable 'smoothscroll' code in cursor_correct() X-Git-Tag: v9.2.0884^0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2ea497f072f102220a683822fd201bfb530894b2;p=thirdparty%2Fvim.git 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) Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- diff --git a/src/move.c b/src/move.c index 49bcfb7cc5..9f90134249 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 56fbf8a76d..29de0350fa 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, /**/