Skip to content

Commit 582b169

Browse files
only21milcodex
andcommitted
test(web): format wide-character terminal link regression
Co-Authored-By: GPT-6.1 Sol <[email protected]>
1 parent a20cda6 commit 582b169

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎apps/web/src/terminal/ghostty/surface.test.ts‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,10 @@ describe("terminalLinkAtPositionWithRange", () => {
516516
(text) => {
517517
const cells = Array.from(text).flatMap((character) =>
518518
/[日本🙂]/u.test(character)
519-
? [{ ...cell(character), wide: 1 }, { ...cell(""), wide: 2 }]
519+
? [
520+
{ ...cell(character), wide: 1 },
521+
{ ...cell(""), wide: 2 },
522+
]
520523
: [cell(character)],
521524
);
522525
const row: GhosttyRow = { cells, text, isWrapContinuation: false, wrapsToNext: false };
@@ -539,7 +542,12 @@ describe("terminalLinkAtPositionWithRange", () => {
539542
wrapsToNext: true,
540543
},
541544
{
542-
cells: [{ ...cell("日"), wide: 1 }, { ...cell(""), wide: 2 }, cell(""), ...Array.from("next", cell)],
545+
cells: [
546+
{ ...cell("日"), wide: 1 },
547+
{ ...cell(""), wide: 2 },
548+
cell(""),
549+
...Array.from("next", cell),
550+
],
543551
text: "日 next",
544552
isWrapContinuation: true,
545553
wrapsToNext: false,

0 commit comments

Comments
 (0)