diff --git a/internal/tui/bubbles/git/log/bubble.go b/internal/tui/bubbles/git/log/bubble.go index 773784e7a..600011791 100644 --- a/internal/tui/bubbles/git/log/bubble.go +++ b/internal/tui/bubbles/git/log/bubble.go @@ -158,7 +158,7 @@ func (b *Bubble) GotoTop() { } func (b *Bubble) Init() tea.Cmd { - return b.reset() + return nil } func (b *Bubble) SetSize(width, height int) { diff --git a/internal/tui/bubbles/git/refs/bubble.go b/internal/tui/bubbles/git/refs/bubble.go index c180d1287..53fec666a 100644 --- a/internal/tui/bubbles/git/refs/bubble.go +++ b/internal/tui/bubbles/git/refs/bubble.go @@ -106,10 +106,14 @@ func (b *Bubble) SetBranch(ref *plumbing.Reference) (tea.Model, tea.Cmd) { } } -func (b *Bubble) Init() tea.Cmd { +func (b *Bubble) reset() tea.Cmd { return b.updateItems() } +func (b *Bubble) Init() tea.Cmd { + return nil +} + func (b *Bubble) SetSize(width, height int) { b.width = width b.height = height @@ -152,7 +156,7 @@ func (b *Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case tea.KeyMsg: switch msg.String() { case "B": - cmds = append(cmds, b.updateItems()) + return b, b.reset() case "enter", "right", "l": if b.list.Index() >= 0 { ref := b.list.SelectedItem().(item).Reference diff --git a/internal/tui/bubbles/git/tree/bubble.go b/internal/tui/bubbles/git/tree/bubble.go index f16a9d71b..805aa5865 100644 --- a/internal/tui/bubbles/git/tree/bubble.go +++ b/internal/tui/bubbles/git/tree/bubble.go @@ -168,7 +168,7 @@ func (b *Bubble) reset() tea.Cmd { } func (b *Bubble) Init() tea.Cmd { - return b.reset() + return nil } func (b *Bubble) SetSize(width, height int) {