Skip to content

Commit 3acbafd

Browse files
committed
fixup! Add tests for window arrangement code
1 parent c76471c commit 3acbafd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pkg/gui/controllers/helpers/window_arrangement_helper_test.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,9 @@ func TestGetWindowDimensions(t *testing.T) {
215215
<branches─────────>│ │
216216
<commits──────────>│ │
217217
<stash────────────>╰──────────────────────────────────╯
218-
<A───────>C<information──────────────────────────────────────────>
218+
<A───────>B<information──────────────────────────────────────────>
219219
A: appStatus
220-
B: statusSpacer1
221-
C: statusSpacer2
220+
B: statusSpacer2
222221
`,
223222
},
224223
}
@@ -293,6 +292,11 @@ func renderLayout(windows map[string]boxlayout.Dimensions) string {
293292
for _, windowName := range windowNames {
294293
dimensions := windows[windowName]
295294

295+
zeroWidth := dimensions.X0 == dimensions.X1+1
296+
if zeroWidth {
297+
continue
298+
}
299+
296300
singleRow := dimensions.Y0 == dimensions.Y1
297301
oneOrTwoColumns := dimensions.X0 == dimensions.X1 || dimensions.X0+1 == dimensions.X1
298302

0 commit comments

Comments
 (0)