mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Enable plain clicks on transcript links and style bare URLs (#46884)
## Why Transcript links required a modified click to open, and bare URLs lacked the visual styling of explicit Markdown links. ## What changed - Open links on release after an unmodified, stationary left click. Cancel activation after dragging, scrolling, or releasing elsewhere so text selection remains usable. - Apply Markdown link styling to bare URLs while preserving surrounding prose, existing emphasis, Unicode, and table wrapping. ## Testing Add gesture tests for bare and Markdown links at narrow and wide widths, drag and scroll cancellation, and existing modified-click behavior. Add styling tests and snapshots covering punctuation, emphasis, tabs, Unicode, and wrapped table URLs. GitOrigin-RevId: 23d12c901932d7e3586d841e5a0ece00e422fccd
This commit is contained in:
@@ -16,6 +16,7 @@ pub(super) struct Selection {
|
||||
pub(super) moved: bool,
|
||||
pub(super) resume_on_empty: bool,
|
||||
pub(super) pointer: Option<ScreenPosition>,
|
||||
pub(super) pressed_link: Option<String>,
|
||||
origin: (Anchor, Anchor),
|
||||
unit: SelectionUnit,
|
||||
preferred_column: Option<u16>,
|
||||
@@ -57,6 +58,7 @@ impl TranscriptView {
|
||||
moved: false,
|
||||
resume_on_empty: was_following,
|
||||
pointer: Some(ScreenPosition::new(column, row)),
|
||||
pressed_link: None,
|
||||
});
|
||||
if was_following {
|
||||
self.hold_position();
|
||||
|
||||
Reference in New Issue
Block a user