Skip to content

Using key commands to scroll to top or bottom of document does not incorporate editor.paddingTop and editor.paddingButtom #118893

Open

Description

  • VS Code Version: 1.54.2
  • OS Version: macOS 10.15.7

If editor.paddingTop or editor.paddingBottom are set, using the keyboard to scroll to the top or bottom of the document does not incorporate that padding... it pins the first/last line at the top/bottom of the viewport.

This was unexpected for me. I have these top/bottom padding settings enabled because I don't like the top or bottom of my code jammed up against the UI or the bottom of the window, and when I use the keyboard to "go to the top" or "go to the bottom" I mean both "put the cursor on the first/last line" and "scroll maximally in that direction".

Steps to Reproduce:

  1. Set editor.paddingTop and editor.paddingBottom to 120.
  2. Scroll to the top with the mouse (120 padding shows — good).
  3. Scroll to the bottom with the mouse (120 padding shows — good).
  4. Press the key command to scroll to the top of the document (⌘-↑ on macOS... presumably "Home" on Windows?).
  5. Note that the first line is at the top of the viewport, with no 120 padding.
  6. Press the key command to scroll to the bottom of the document (⌘-↓ on macOS... presumably "End" on Windows?).
  7. Note that the last line is at the bottom of the viewport, with no 120 padding.

Does this issue occur when all extensions are disabled?: Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugeditor-commandsEditor text manipulation commands

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions