fix(tui): handle CRLF and CR line endings (#6764)

This commit is contained in:
Xiangzhe
2026-07-17 15:01:10 +08:00
committed by GitHub
parent 216e672e7c
commit 00b032676f
2 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -719,7 +719,7 @@ export function wrapTextWithAnsi(text: string, width: number): string[] {
// Handle newlines by processing each line separately
// Track ANSI state across lines so styles carry over after literal newlines
const inputLines = text.split("\n");
const inputLines = text.split(/\r\n|\r|\n/);
const result: string[] = [];
const tracker = new AnsiCodeTracker();