documents: a right press in an open block targets the pressed byte
CI / platforms (windows-latest) (push) Failing after 9s
CI / site (push) Successful in 23s
CI / crate (push) Failing after 11m46s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

The open block's target was read at the selection's start and from
the syntax tree only, so a press on the second of two selected links
named the first, and an inline anchor read as its outer link.
point_open now reads the byte under the press and resolves links as
drawing does; delete_image takes that byte.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-14 20:18:22 -04:00
1 parent 6df9ab0aa6
commit 79e94f7e24
6 files changed
+165 -36

No files matched your search

+2 -2
View File
@@ -72,10 +72,10 @@ impl MarkdownDocument {
// Focus fades all but the reader's block.
let faded = self.look.focus && editing_mode(self.mode) && ix != self.current_block(cx);
let open = self.open.as_ref();
let point = cx.listener(|document, _: &MouseDownEvent, window, cx| {
let point = cx.listener(|document, event: &MouseDownEvent, window, cx| {
window.prevent_default();
cx.stop_propagation();
document.point_open(cx);
document.point_open(event.position, cx);
});
let field = |open: &super::Open| {
div()