Skip to content

Commit 0be4791

Browse files
authored
Merge pull request #1 from luthermonson/fix-split-pane-init
2 parents 8af72be + d96b4fd commit 0be4791

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tui/app.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,12 @@ func activeTheme(cfg *config.Config) string {
322322

323323
func (m model) Init() tea.Cmd {
324324
cmds := []tea.Cmd{m.cmd.Init(), m.spinner.Tick, m.resolveProfileCmd()}
325-
if m.current != nil {
326-
cmds = append(cmds, m.current.Init())
325+
// Init every live pane, not just the primary: panes restored from
326+
// cfg.LastSplit at startup otherwise never fire their first fetch.
327+
for _, v := range []views.View{m.current, m.secondary, m.tertiary, m.quaternary} {
328+
if v != nil {
329+
cmds = append(cmds, v.Init())
330+
}
327331
}
328332
return tea.Batch(cmds...)
329333
}

0 commit comments

Comments
 (0)