Unverified Commit 7ba21d0e authored by Ruben Bridgewater's avatar Ruben Bridgewater Committed by Myles Borins
Browse files

readline: improve getStringWidth()

1. Simplify the getStringWidth function used by Intl builds by removing
   dead code (the options were unused) and by refactoring the logic.
2. Improve the getStringWidth unicode handling used by non-Intl builds.
   The getStringWidth function returned the wrong width for multiple
   inputs. It's now improved by supporting various zero width characters
   and more full width characters.

PR-URL: https://github.com/nodejs/node/pull/31112


Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 2e54a992
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment