fix(tui): stabilize regional indicator width to prevent streaming render drift (#1783)
This commit is contained in:
@@ -111,6 +111,11 @@ describe("wrapTextWithAnsi", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("should treat isolated regional indicators as width 2", () => {
|
||||
assert.strictEqual(visibleWidth("🇨"), 2);
|
||||
assert.strictEqual(visibleWidth("🇨🇳"), 2);
|
||||
});
|
||||
|
||||
it("should truncate trailing whitespace that exceeds width", () => {
|
||||
const twoSpacesWrappedToWidth1 = wrapTextWithAnsi(" ", 1);
|
||||
assert.ok(visibleWidth(twoSpacesWrappedToWidth1[0]) <= 1);
|
||||
|
||||
Reference in New Issue
Block a user