Files
zed/crates/markdown_preview
Xiaobo Liu 5299a14401 markdown: Add macOS lookup support for Markdown preview (#59297)
# Objective

Enable macOS three-finger Look Up / translation for rendered Markdown,
including Markdown Preview when it is the active focused item.

## Solution

- Register a read-only input handler for rendered Markdown when either
the Markdown view itself is focused or Markdown Preview provides the
active focus handle.
- Reuse the existing rendered Markdown text mapping for visible text
extraction, hit testing, and bounds calculation.
- Add UTF-16 range conversion so AppKit lookup requests map correctly
between macOS text ranges and Markdown source ranges, including CJK text
and emoji.

Release Notes:

- Improved Markdown Preview by supporting macOS Look Up / translation
gestures when focused.

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-09-23 03:58:52 +00:00
..