* Look up the URL at (col, row) in the current front frame. Checks for * an OSC 8 hyperlink first, then falls back to scanning the row for a * plain-text URL (mouse tracking intercepts the terminal's native * Cmd+Click URL detection, so we replicate it). This is a pure lookup * with no s
(col: number, row: number)
| 1291 | * the browser-open action via a timer. |
| 1292 | */ |
| 1293 | getHyperlinkAt(col: number, row: number): string | undefined { |
| 1294 | if (!this.altScreenActive) return undefined; |
| 1295 | const screen = this.frontFrame.screen; |
| 1296 | const cell = cellAt(screen, col, row); |
| 1297 | let url = cell?.hyperlink; |
| 1298 | // SpacerTail cells (right half of wide/CJK/emoji chars) store the |
| 1299 | // hyperlink on the head cell at col-1. |
| 1300 | if (!url && cell?.width === CellWidth.SpacerTail && col > 0) { |
| 1301 | url = cellAt(screen, col - 1, row)?.hyperlink; |
| 1302 | } |
| 1303 | return url ?? findPlainTextUrlAt(screen, col, row); |
| 1304 | } |
| 1305 | |
| 1306 | /** |
| 1307 | * Optional callback fired when clicking an OSC 8 hyperlink in fullscreen |
no test coverage detected