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

+4 -3
View File
@@ -29,9 +29,10 @@ impl MarkdownDocument {
)
}
/// Removes the picture at the caret, read apart.
pub fn delete_image(&mut self, cx: &mut Context<Self>) -> Result<(), EditRefusal> {
self.apart("delete image".to_string(), drop_image, cx)
/// Removes the picture at source byte `at`, read apart.
pub fn delete_image(&mut self, at: usize, cx: &mut Context<Self>) -> Result<(), EditRefusal> {
let drop = move |full: &str, _| drop_image(full, at);
self.apart("delete image".to_string(), drop, cx)
}
/// `command` at the caret, read apart; refusals by event.