Browse Source

Adds extra length check for perf

main
Eric Amodio 2 years ago
parent
commit
023011bdbe
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/system/string.ts

+ 2
- 0
src/system/string.ts View File

@ -405,6 +405,8 @@ export function getWidth(s: string): number {
}
s = s.replace(cachedAnsiRegex, '');
if (s.length === 0) return 0;
let count = 0;
let emoji = 0;
let joiners = 0;

Loading…
Cancel
Save