From f94d0be2c9b0eaaf539d2cdcfaf258f754162a2e Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 25 Feb 2020 20:55:36 +1100 Subject: refactor the way we render lists --- pkg/gui/commits_panel.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pkg/gui/commits_panel.go') diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index e42aabfd0..fe6b7acb9 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -632,7 +632,13 @@ func (gui *Gui) switchCommitsPanelContext(context string) error { commitsView.TabIndex = contextTabIndexMap[context] - switch context { + return gui.refreshCommitsViewWithSelection() +} + +func (gui *Gui) refreshCommitsViewWithSelection() error { + commitsView := gui.getCommitsView() + + switch commitsView.Context { case "branch-commits": return gui.renderBranchCommitsWithSelection() case "reflog-commits": -- cgit v1.2.3