Unverified Commit 539df738 authored by Ruben Bridgewater's avatar Ruben Bridgewater
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 b52bf605
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