Fix ANSI escape crash in text buffer (#3987) (#3999)

Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
Ali
2025-07-17 20:53:30 +03:00
committed by GitHub
parent 88b5f20943
commit 4ca471bac6

View File

@@ -40,7 +40,7 @@ function isWordChar(ch: string | undefined): boolean {
*/
function stripUnsafeCharacters(str: string): string {
const stripped = stripAnsi(str);
return toCodePoints(stripAnsi(stripped))
return toCodePoints(stripped)
.filter((char) => {
if (char.length > 1) return false;
const code = char.codePointAt(0);