[vim/vim] scroll: unreachable 'smoothscroll' code in cursor_correct() (PR #20891)

h_east (Vim Github Repository) <[email protected]> Fri, 31 Jul 2026 01:04:13 -0700
Newsgroups gmane.editors.vim.devel
Message-ID <vim/vim/pull/[email protected]>
```
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.
```

---

Found while auditing the places that reset w_skipcol.  The check requires
'wrap' to be off, where 'smoothscroll' has no effect, so it never runs.
Removing it does not change behaviour: 20 cases of 'smoothscroll' with
'nowrap' in a one line window give identical results before and after.
You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20891

-- Commit Summary --

  * scroll: unreachable 'smoothscroll' code in cursor_correct()

-- File Changes --

    M src/move.c (13)

-- Patch Links --

https://github.com/vim/vim/pull/20891.patch
https://github.com/vim/vim/pull/20891.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/20891
You are receiving this because you are subscribed to this thread.

Message ID: <vim/vim/pull/[email protected]>

-- 
-- 
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/vim/vim/pull/20891%40github.com.