Diff
1diff --git a/internal/tui/bubble.go b/internal/tui/bubble.go
2index 5353824e1dd918613bbba39bfa431453295ee0e3..de36991115f37bcf9e08c6c6132c23fa80eb82d8 100644
3--- a/internal/tui/bubble.go
4+++ b/internal/tui/bubble.go
5@@ -7,7 +7,6 @@ import (
6 tea "github.com/charmbracelet/bubbletea"
7 "github.com/charmbracelet/lipgloss"
8 "github.com/charmbracelet/soft/internal/config"
9- "github.com/charmbracelet/soft/internal/git"
10 "github.com/charmbracelet/soft/internal/tui/bubbles/repo"
11 "github.com/charmbracelet/soft/internal/tui/bubbles/selection"
12 "github.com/charmbracelet/soft/internal/tui/style"
13@@ -47,11 +46,13 @@ type Bubble struct {
14 height int
15 initialRepo string
16 repoMenu []MenuEntry
17- repos []*git.Repo
18 boxes []tea.Model
19 activeBox int
20 repoSelect *selection.Bubble
21 session ssh.Session
22+
23+ // remember the last resize so we can re-send it when selecting a different repo.
24+ lastResize tea.WindowSizeMsg
25 }
26
27 func NewBubble(cfg *config.Config, sCfg *SessionConfig) *Bubble {
28@@ -96,6 +97,7 @@ func (b *Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
29 b.state = errorState
30 return b, nil
31 case tea.WindowSizeMsg:
32+ b.lastResize = msg
33 b.width = msg.Width
34 b.height = msg.Height
35 if b.state == loadedState {
36@@ -116,6 +118,9 @@ func (b *Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
37 rb := b.repoMenu[msg.Index].bubble
38 rb.GotoTop()
39 b.boxes[1] = b.repoMenu[msg.Index].bubble
40+ cmds = append(cmds, func() tea.Msg {
41+ return b.lastResize
42+ })
43 }
44 if b.state == loadedState {
45 ab, cmd := b.boxes[b.activeBox].Update(msg)