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

2 views
Skip to first unread message

h_east

unread,
4:04 AM (18 hours ago) 4:04 AM
to vim/vim, Subscribed
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

  • 5cb13d0 scroll: unreachable 'smoothscroll' code in cursor_correct()

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20891@github.com>

Christian Brabandt

unread,
2:32 PM (7 hours ago) 2:32 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#20891)

thanks


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20891/c5146236110@github.com>

Reply all
Reply to author
Forward
0 new messages