Skip to content

markdown_preview: Add ScrollToTop and ScrollToBottom actions#50460

Merged
SomeoneToIgnore merged 1 commit intozed-industries:mainfrom
dremnik:markdown-preview-scroll-to-top-bottom
Mar 17, 2026
Merged

markdown_preview: Add ScrollToTop and ScrollToBottom actions#50460
SomeoneToIgnore merged 1 commit intozed-industries:mainfrom
dremnik:markdown-preview-scroll-to-top-bottom

Conversation

@dremnik
Copy link
Copy Markdown
Contributor

@dremnik dremnik commented Mar 2, 2026

Add gg/G (vim), cmd-up/cmd-down (macOS), and ctrl-home/ctrl-end (Linux/Windows) keybindings to scroll to the top and bottom of the markdown preview.

The markdown preview already has page scroll (ctrl-d/ctrl-u), line scroll (ctrl-e/ctrl-y), and item scroll (alt-up/alt-down) but was missing top/bottom navigation. This adds two new actions — ScrollToTop and ScrollToBottom — using the existing ListState::scroll_to() infrastructure, following the same pattern as the other scroll actions.

  • Done a self-review taking into account security and performance aspects

Release Notes:

  • Added scroll-to-top and scroll-to-bottom keybindings for markdown preview (gg/G in vim mode, cmd-up/cmd-down on macOS, ctrl-home/ctrl-end on Linux/Windows)

Add gg/G (vim), cmd-up/cmd-down (macOS), and ctrl-home/ctrl-end
(Linux/Windows) keybindings to scroll to the top and bottom of the
markdown preview, matching the existing page and line scroll actions.
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Mar 2, 2026
@MrSubidubi MrSubidubi added the area:preview/markdown Feedback for Zed's Markdown preview label Mar 9, 2026
Copy link
Copy Markdown
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@SomeoneToIgnore SomeoneToIgnore self-assigned this Mar 17, 2026
@SomeoneToIgnore SomeoneToIgnore merged commit 4e9ffa3 into zed-industries:main Mar 17, 2026
38 checks passed
piper-of-dawn pushed a commit to piper-of-dawn/zed that referenced this pull request Apr 25, 2026
…ustries#50460)

Add `gg`/`G` (vim), `cmd-up`/`cmd-down` (macOS), and
`ctrl-home`/`ctrl-end` (Linux/Windows) keybindings to scroll to the top
and bottom of the markdown preview.

The markdown preview already has page scroll (`ctrl-d`/`ctrl-u`), line
scroll (`ctrl-e`/`ctrl-y`), and item scroll (`alt-up`/`alt-down`) but
was missing top/bottom navigation. This adds two new actions —
`ScrollToTop` and `ScrollToBottom` — using the existing
`ListState::scroll_to()` infrastructure, following the same pattern as
the other scroll actions.

- [x] Done a self-review taking into account security and performance
aspects

Release Notes:

- Added scroll-to-top and scroll-to-bottom keybindings for markdown
preview (`gg`/`G` in vim mode, `cmd-up`/`cmd-down` on macOS,
`ctrl-home`/`ctrl-end` on Linux/Windows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:preview/markdown Feedback for Zed's Markdown preview cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants