Skip to content

markdown_preview: Make markdown preview clone and splittable - #65136

Merged
SomeoneToIgnore merged 4 commits into
zed-industries:mainfrom
yskim308:markdown-preview-split-pane
Oct 5, 2026
Merged

SomeoneToIgnore merged 4 commits into
zed-industries:mainfrom
yskim308:markdown-preview-split-pane

Conversation

@yskim308

@yskim308 yskim308 commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #36790
Closes #63076 (duplicate)

A focused markdown preview ignored keyboard pane-split shortcuts because MarkdownPreviewView didn't implement
Item::can_split / Item::clone_on_split.

This implements both methods so a preview splits like any other pane item.

Screen.Recording.2026-10-04.at.4.10.45.PM.mov

Testing

Added splitting_preview_clones_into_new_pane: it opens a file and its preview, calls Workspace::split_and_clone, and asserts the split succeeds and the new pane's active item is a MarkdownPreviewView.

cargo test -p markdown_preview passes.

To verify manually:

  1. Open a .md file and open its Markdown Preview.
  2. Focus the preview pane.
  3. Split the pane with keyboard shortcut (or command)
  4. A new pane appears containing its own preview bound to the same source editor.

manually tested on macOS 26.6.1, M4

Self-review

  • I've reviewed my diff for quality, security, reliability, and performance.
  • UI changes follow the checklist.
  • Tests cover the new or changed behavior.

Release Notes:

  • Fixed the Markdown Preview pane ignoring the pane split shortcuts (cmd-\, cmd-k ...) when focused

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Oct 4, 2026
@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Oct 4, 2026

@osiewicz osiewicz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for submitting a PR and using Zed. Your submission looks good to me. :)

@MrSubidubi MrSubidubi changed the title MarkdownPreviewView: Make markdown preview clone and splittable markdown_preview: Make markdown preview clone and splittable Oct 5, 2026
Comment thread crates/markdown_preview/src/markdown_preview_view.rs Outdated
Comment thread crates/markdown_preview/src/markdown_preview_view.rs Outdated
@SomeoneToIgnore SomeoneToIgnore self-assigned this Oct 5, 2026
@SomeoneToIgnore
SomeoneToIgnore added this pull request to the merge queue Oct 5, 2026
Merged via the queue into zed-industries:main with commit b92c029 Oct 5, 2026
37 checks passed
@yeskunall yeskunall mentioned this pull request Oct 6, 2026
5 tasks done
@yskim308
yskim308 deleted the markdown-preview-split-pane branch October 15, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split Pane command does not work from Markdown preview Split pane commands do not work when a preview tab is in focus

4 participants