fix(tui): show background shell completion (#36534)

This commit is contained in:
Kit Langton
2026-07-12 21:01:36 -04:00
committed by GitHub
parent f112a73c06
commit c0ed0106b1
5 changed files with 54 additions and 8 deletions
+9
View File
@@ -0,0 +1,9 @@
import { expect, test } from "bun:test"
import { Locale } from "../../src/util/locale"
test("truncates text from the right by terminal width", () => {
expect(Locale.truncateWidth("abcdefgh", 5)).toBe("abcd…")
expect(Locale.truncateWidth("ab界cd", 5)).toBe("ab界…")
expect(Locale.truncateWidth("abcdefgh", 1)).toBe("…")
expect(Locale.truncateWidth("abcdefgh", 0)).toBe("")
})