@@ -31,7 +31,7 @@ func (gui *Gui) getWindowDimensions(informationStr string, appStatus string) map
3131
3232 extrasWindowSize := gui .getExtrasWindowSize (height )
3333
34- showInfoSection := gui .c .UserConfig .Gui .ShowBottomLine || ( gui .State .Searching .isSearching || gui .isAnyModeActive ())
34+ showInfoSection := gui .c .UserConfig .Gui .ShowBottomLine || gui .State .Searching .isSearching || gui .isAnyModeActive () || gui . statusManager . showStatus ( )
3535 infoSectionSize := 0
3636 if showInfoSection {
3737 infoSectionSize = 1
@@ -159,30 +159,26 @@ func (gui *Gui) infoSectionChildren(informationStr string, appStatus string) []*
159159 }
160160 }
161161
162- result := []* boxlayout.Box {}
162+ appStatusBox := & boxlayout.Box {Window : "appStatus" }
163+ optionsBox := & boxlayout.Box {Window : "options" }
163164
164- if len (appStatus ) > 0 {
165- result = append (result ,
166- & boxlayout.Box {
167- Window : "appStatus" ,
168- Size : runewidth .StringWidth (appStatus ) + runewidth .StringWidth (INFO_SECTION_PADDING ),
169- },
170- )
165+ if ! gui .c .UserConfig .Gui .ShowBottomLine {
166+ optionsBox .Weight = 0
167+ appStatusBox .Weight = 1
168+ } else {
169+ optionsBox .Weight = 1
170+ appStatusBox .Size = runewidth .StringWidth (INFO_SECTION_PADDING ) + runewidth .StringWidth (appStatus )
171171 }
172172
173- result = append (result ,
174- []* boxlayout.Box {
175- {
176- Window : "options" ,
177- Weight : 1 ,
178- },
179- {
180- Window : "information" ,
181- // unlike appStatus, informationStr has various colors so we need to decolorise before taking the length
182- Size : runewidth .StringWidth (INFO_SECTION_PADDING ) + runewidth .StringWidth (utils .Decolorise (informationStr )),
183- },
184- }... ,
185- )
173+ result := []* boxlayout.Box {appStatusBox , optionsBox }
174+
175+ if gui .c .UserConfig .Gui .ShowBottomLine || gui .isAnyModeActive () {
176+ result = append (result , & boxlayout.Box {
177+ Window : "information" ,
178+ // unlike appStatus, informationStr has various colors so we need to decolorise before taking the length
179+ Size : runewidth .StringWidth (INFO_SECTION_PADDING ) + runewidth .StringWidth (utils .Decolorise (informationStr )),
180+ })
181+ }
186182
187183 return result
188184}
0 commit comments