Commit 9e23eeff authored by Anna Henningsen's avatar Anna Henningsen Committed by Anto Aravinth
Browse files

console: use getStringWidth() for character width calculation

This is more accurate for displayed full-width characters
(e.g. CJK ones) and makes the calculations match the ones we
use in the readline module.

Fixes: https://github.com/nodejs/node/issues/29299

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


Reviewed-By: default avatarGus Caplan <me@gus.host>
Reviewed-By: default avatarTrivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: default avatarYongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 2cc757f0
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