Right press: one alignment pass, latest press wins
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:
1 parent
a4bf6965f9
commit
2b8bd9fcf3
5 files changed
+99
-19
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user