Sticky Scroll partially breaks zt
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
When stick scroll is enabled, zt behaves as if it can never go to the top of the file but is restricted to go as far as "top" - editor.stickyScroll.maxLineCount. Which means that, if editor.stickyScroll.maxLineCount is 20, zt will always have a scroll offset of 20, independent of how many lines stick scroll may actually be showing/using.
To Reproduce
- Set editor.stickyScroll.maxLineCount option to 20
- Use zt in normal mode
- Observe that "top" of zt is 20 lines below the top.
Expected behavior
Either go to the actual top as if no scroll offset would exist, independent of what sticky scrolling may be showing, or to to the line directly below the actual content of sticky scroll. Don't use editor.stickyScroll.maxLineCount as fixed scroll offset.
Screenshots
Environment (please complete the following information):
- Extension (VsCodeVim) version: v1.27.3
- VSCode version: 1.91.1
- OS: Linux
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in VS Code 1.91.1 with VSCodeVim v1.27.3, editor.stickyScroll.maxLineCount set to 20, and zt in normal mode. Compare zt's top position with sticky scroll disabled and with different visible sticky-content lengths; the fix is complete when zt can reach the actual top or the line directly below the displayed sticky content rather than using the configured maximum as a fixed offset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100