fix-deviant(links): bound hover lookup and renderer regex work

Follow-up testing showed that the mailbox limit did not fix the base64
hang: moving the pointer stalled the app, and opening a tab could hang it.
Mouse link lookup copied the entire wrapped line before checking modifier
eligibility, while renderer link searches had no whole-search work budget.

Filter eligible links before traversing scrollback. Add bounded logical
line selection and skip automatic regex lookup on lines exceeding 65,536
grid cells. Keep explicit line selection and OSC8 handling unrestricted.
Skip oversized lines instead of truncating URLs into different targets.

Apply the existing terminal StringMap retry budget to renderer searches
and handle search errors without panicking. The regression triggered a
retry-limit panic through the old onig search API and now returns normally,
allowing subsequent link patterns to run.

Document the lookup limits and correct the earlier mailbox fix entry to
record that it did not resolve the reported hang on its own.

Test Plan:
- 1,513 unit/integration tests and one doctest pass across core, renderer,
  and terminal with Mesa software OpenGL; one existing doctest is ignored.
- Release application build, formatting, and all-target Clippy pass.
- GTK handles 400 pointer moves, including Ctrl hover, during continuous
  base64 output, opens/closes a tab, handles Ctrl+C, prints a marker, and
  exits cleanly. Normal URL hover still works after a hard newline.

Reference: docs/rewrite/DEVIANT_FIXES.md (entry 41)
This commit is contained in:
ddidderr committed 2026-10-15 00:02:47 +02:00
1 parent 4c31d27888
commit 9010117d08
9 files changed
+153 -24

No files matched your search

+1
View File
@@ -13,6 +13,7 @@ ghostty-os.workspace = true
ghostty-datastruct.workspace = true
ghostty-font.workspace = true
ghostty-input.workspace = true
ghostty-onig.workspace = true
ghostty-terminal.workspace = true
ghostty-unicode.workspace = true
ghostty-vt.workspace = true