fix(tui): align hunk header inset
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user