fix(tui): align hunk header inset

This commit is contained in:
James Long
2026-07-30 16:42:44 +00:00
parent 71a86995c6
commit cfd8fa4961
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ export function PatchDiff(props: Props) {
<Show when={index() > 0}>
<box width="100%" height={1} backgroundColor={local.lineNumberBg}>
<text fg={local.hunkFg} bg={local.lineNumberBg}>
{hunk.header ?? ""}
{` ${hunk.header ?? ""}`}
</text>
</box>
</Show>
@@ -50,8 +50,8 @@ test("renders separate diff nodes with a full-width hunk row", async () => {
const secondLine = frame.split("\n").find((line) => line.includes("const second")) ?? ""
const background = parseColor("#222222")
expect(header?.startsWith("@@ -20,3 +20,3 @@")).toBe(true)
expect(header?.trimEnd()).toBe("@@ -20,3 +20,3 @@")
expect(header?.startsWith(" @@ -20,3 +20,3 @@")).toBe(true)
expect(header?.trimEnd()).toBe(" @@ -20,3 +20,3 @@")
expect(
app
.captureSpans()