Right press: one alignment pass, latest press wins
CI / platforms (windows-latest) (push) Failing after 10s
CI / site (push) Successful in 22s
CI / crate (push) Failing after 12m14s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

drawn_at aligns each source piece once instead of re-reading the span
for every drawn byte, so a right press near a long paragraph's start
stays linear. A newer press drops an older pending open-block lookup.

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 21:40:55 -04:00
1 parent a4bf6965f9
commit 2b8bd9fcf3
5 files changed
+99 -19

No files matched your search

+3
View File
@@ -116,6 +116,8 @@ pub struct MarkdownDocument {
focus: FocusHandle,
/// A secondary press took focus.
pointing: bool,
/// The latest press; older lookups lapse.
pressed: u64,
on_link: Option<OnLink>,
on_heading: Option<OnHeading>,
_subscriptions: Vec<Subscription>,
@@ -182,6 +184,7 @@ impl MarkdownDocument {
room: Pixels::ZERO,
focus,
pointing: false,
pressed: 0,
on_link: None,
on_heading: Some(on_heading),
_subscriptions: subscriptions,