Commit: patch 9.2.0884: scroll: unreachable 'smoothscroll' code in cursor_correct()
Christian Brabandt <[email protected]> Fri, 31 Jul 2026 20:45:06 +0200
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <[email protected]> |
patch 9.2.0884: scroll: unreachable 'smoothscroll' code in cursor_correct() Commit: https://github.com/vim/vim/commit/2ea497f072f102220a683822fd201bfb530894b2 Author: Hirohito Higashi <[email protected]> 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) <[email protected]> Signed-off-by: Hirohito Higashi <[email protected]> Signed-off-by: Christian Brabandt <[email protected]> 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, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1wpsEE-006EbN-CQ%40256bit.org.