@@ -266,8 +266,8 @@ func infoSectionChildren(args WindowArrangementArgs) []*boxlayout.Box {
266
266
267
267
statusSpacerPrefix := "statusSpacer"
268
268
spacerBoxIndex := 0
269
- maxSpacerBoxIndex := 4 // See pkg/gui/types/views.go
270
- // Returns a box with size 1 to be used as padding before, between, or after views
269
+ maxSpacerBoxIndex := 2 // See pkg/gui/types/views.go
270
+ // Returns a box with size 1 to be used as padding between views
271
271
spacerBox := func () * boxlayout.Box {
272
272
spacerBoxIndex ++
273
273
@@ -278,7 +278,7 @@ func infoSectionChildren(args WindowArrangementArgs) []*boxlayout.Box {
278
278
return & boxlayout.Box {Window : fmt .Sprintf ("%s%d" , statusSpacerPrefix , spacerBoxIndex ), Size : 1 }
279
279
}
280
280
281
- // Returns a box with weight 1 to be used as flexible padding before, between, or after views
281
+ // Returns a box with weight 1 to be used as flexible padding between views
282
282
flexibleSpacerBox := func () * boxlayout.Box {
283
283
spacerBoxIndex ++
284
284
@@ -327,9 +327,11 @@ func infoSectionChildren(args WindowArrangementArgs) []*boxlayout.Box {
327
327
328
328
if len (result ) == 2 && result [0 ].Window == "appStatus" {
329
329
// Only status and information are showing; need to insert a flexible
330
- // spacer after the 1-width spacer between the two, so that information
331
- // is right-aligned
332
-
330
+ // spacer between the two, so that information is right-aligned. Note
331
+ // that the call to insertSpacerBoxes below will still insert a 1-char
332
+ // spacer in addition (right after the flexible one); this is needed for
333
+ // the case that there's not enough room, to ensure there's always at
334
+ // least one space.
333
335
result = slices .Insert (result , 1 , flexibleSpacerBox ())
334
336
} else if len (result ) == 1 {
335
337
if result [0 ].Window == "information" {
0 commit comments