[vim/vim] scroll: 'smoothscroll' position is lost when the window is squeezed (PR #20892)

3 views
Skip to first unread message

h_east

unread,
4:27 AM (18 hours ago) 4:27 AM
to vim/vim, Subscribed
Problem:  With 'smoothscroll' the scroll position in a long line is lost when
          a window is temporarily squeezed to a couple of lines, for example
          when opening and closing a help window.
Solution: When the cursor ends up in the skipped columns, skip up to the
          screen line the cursor is in instead of showing the start of the
          line.

To reproduce, with 'smoothscroll' and a line longer than the window:

exe "norm! gg10\<C-E>"
new
wincmd _
close

The window was scrolled back to the start of the line. ":help" followed by
":close" does the same when the help window leaves little room.

Not fixed by this: while the window is squeezed the skipped columns are
adjusted to keep the cursor visible, which is correct, so the position can
end up one screen line off. Restoring it exactly needs the saved values
that the todo.txt entry asks for, that entry stays as it is.


You can view, comment on, or merge this pull request online at:

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

Commit Summary

  • 9bbb761 scroll: 'smoothscroll' position is lost when the window is squeezed

File Changes

(2 files)

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/20892@github.com>

Christian Brabandt

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

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/20892/c5146315905@github.com>

Reply all
Reply to author
Forward
0 new messages