SIGN IN SIGN UP

Make terminal hyperlinks display correctly with changing content (#54884)

- Closes #31866

Currently, `Terminal::alacritty::make_content()` always carries over any
existing hovered word. With this PR we now:
- *Are more selective*: Only carry forward the hovered word if the
terminal grid shape and visible lines have not changed
- *Correctly handle a shifting viewport*: If the grid shape and visible
lines have not changed, but new lines were added to the terminal we
carry the hovered word forward, and adjust the lines of the `word_match`
so that the original text remains hyperlinked.

Also, this PR relaxes the test for displaying a hyperlink in
`TerminalElement::prepaint`. We now display hyperlinks as long as the
`hovered_word.id`s from terminal and terminal_view match. Previously we
required all fields to be equal, which resulted in the hyperlink
flickering when scrolled back with new lines being added.

Release Notes:

- Terminal: Made hyperlinks display correctly with changing content

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
D
Dave Waggoner committed
b41505358fd9e80c746855c2533940643f2138ea
Parent: dd04a22
Committed by GitHub <noreply@github.com> on 8/13/2026, 2:13:12 PM