documents: a right press in an open block targets the pressed byte
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:
1 parent
6df9ab0aa6
commit
79e94f7e24
6 files changed
+165
-36
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user