From 5186e2ccc305ab54a2bb1239fda3656d8b4ab950 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 14 Aug 2026 21:47:15 +0000 Subject: [PATCH] Skip terminal hyperlink layout when no links are present (#38657) ## What changed Return early from `mark_buffer_hyperlinks` when none of the supplied lines contain hyperlink metadata, avoiding unnecessary paragraph layout work. GitOrigin-RevId: bdd6727f3dab7cef87646f97ac955e848cfcfee2 --- codex-rs/tui/src/terminal_hyperlinks.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/tui/src/terminal_hyperlinks.rs b/codex-rs/tui/src/terminal_hyperlinks.rs index 3e415fa14a..e9580dc68c 100644 --- a/codex-rs/tui/src/terminal_hyperlinks.rs +++ b/codex-rs/tui/src/terminal_hyperlinks.rs @@ -500,7 +500,7 @@ pub(crate) fn mark_buffer_hyperlinks( lines: &[HyperlinkLine], scroll_rows: usize, ) { - if area.width == 0 { + if area.width == 0 || lines.iter().all(|line| line.hyperlinks.is_empty()) { return; } let mut logical_row = 0usize;