mirror of
https://github.com/openai/codex.git
synced 2026-11-09 08:40:33 +00:00
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
This commit is contained in:
1 parent
c530bcd4cd
commit
5186e2ccc3
1 file changed
+1
-1
@@ -500,7 +500,7 @@ pub(crate) fn mark_buffer_hyperlinks(
|
|||||||
lines: &[HyperlinkLine],
|
lines: &[HyperlinkLine],
|
||||||
scroll_rows: usize,
|
scroll_rows: usize,
|
||||||
) {
|
) {
|
||||||
if area.width == 0 {
|
if area.width == 0 || lines.iter().all(|line| line.hyperlinks.is_empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let mut logical_row = 0usize;
|
let mut logical_row = 0usize;
|
||||||
|
|||||||
Reference in new issue
Block a user