* Get reset codes for attributes that need to be turned off at line end. * Underline must be closed to prevent bleeding into padding. * Active OSC 8 hyperlinks must be closed and re-opened on the next line. * Returns empty string if no attributes need closing.
()
| 603 | * Returns empty string if no attributes need closing. |
| 604 | */ |
| 605 | getLineEndReset(): string { |
| 606 | let result = ""; |
| 607 | if (this.underline) { |
| 608 | result += "\x1b[24m"; // Underline off only |
| 609 | } |
| 610 | if (this.activeHyperlink) { |
| 611 | result += formatOsc8Close(this.activeHyperlink.terminator); // Re-opened at line start via getActiveCodes() |
| 612 | } |
| 613 | return result; |
| 614 | } |
| 615 | } |
| 616 | |
| 617 | function updateTrackerFromText(text: string, tracker: AnsiCodeTracker): void { |
no test coverage detected