Fix TUI tab width accounting

closes #5218
This commit is contained in:
Mario Zechner
2026-06-02 13:54:47 +02:00
parent 4c6c4482b4
commit 13898f048f
3 changed files with 31 additions and 0 deletions

View File

@@ -162,6 +162,10 @@ function finalizeTruncatedResult(
* check to avoid running the RGI_Emoji regex unnecessarily.
*/
function graphemeWidth(segment: string): number {
if (segment === "\t") {
return 3;
}
// Zero-width clusters
if (zeroWidthRegex.test(segment)) {
return 0;