summaryrefslogtreecommitdiffstats
path: root/pkg/gui/commits_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-21 19:53:45 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commit2d90e1e8ee5ccb3d2acd8678e68137645c9e65bd (patch)
treecb623a51873bd086967ea794b21210861ce5031e /pkg/gui/commits_panel.go
parentddf25e14afe5ddfc2527149c54ea55ea2e83610a (diff)
commit files kind of generalised
Diffstat (limited to 'pkg/gui/commits_panel.go')
-rw-r--r--pkg/gui/commits_panel.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go
index 148a0e460..697da9ee7 100644
--- a/pkg/gui/commits_panel.go
+++ b/pkg/gui/commits_panel.go
@@ -505,14 +505,7 @@ func (gui *Gui) handleViewCommitFiles() error {
return nil
}
- gui.State.Panels.CommitFiles.refName = commit.Sha
- gui.Contexts.CommitFiles.Context.SetParentContext(gui.Contexts.BranchCommits.Context)
-
- if err := gui.refreshCommitFilesView(); err != nil {
- return err
- }
-
- return gui.switchContext(gui.Contexts.CommitFiles.Context)
+ return gui.switchToCommitFilesContext(commit.Sha, false, gui.Contexts.BranchCommits.Context, "commits")
}
func (gui *Gui) hasCommit(commits []*commands.Commit, target string) (int, bool) {