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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

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);