mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-24 01:20:29 +01:00
5299a14401
# 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>