diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-16 13:58:29 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 7f89113245307be8a1642105014e9ce51a47210f (patch) | |
tree | 0b1237c4bdd4a465bedb7cc49c8372d0bfc46ea5 /pkg/gui/commits_panel.go | |
parent | 0ea0c486310558e26af7ad6e4fcf17f57c2b62e3 (diff) |
WIP
Diffstat (limited to 'pkg/gui/commits_panel.go')
-rw-r--r-- | pkg/gui/commits_panel.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index 018782a34..6d88d30f9 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -54,8 +54,6 @@ func (gui *Gui) handleCommitSelect() error { return gui.newStringTask("main", gui.Tr.SLocalize("NoCommitsThisBranch")) } - gui.getCommitsView().FocusPoint(0, gui.State.Panels.Commits.SelectedLine) - if gui.inDiffMode() { return gui.renderDiff() } @@ -104,7 +102,7 @@ func (gui *Gui) refreshCommits() error { go func() { _ = gui.refreshCommitsWithLimit() - if gui.g.CurrentView() == gui.getCommitFilesView() || (gui.g.CurrentView() == gui.getMainView() && gui.State.MainContext == "patch-building") { + if gui.g.CurrentView() == gui.getCommitFilesView() || (gui.currentContext().GetKey() == gui.Contexts.PatchBuilding.Context.GetKey()) { _ = gui.refreshCommitFilesView() } wg.Done() @@ -528,7 +526,7 @@ func (gui *Gui) handleSwitchToCommitFilesPanel() error { return err } - return gui.switchFocus(gui.getCommitsView(), gui.getCommitFilesView()) + return gui.switchContext(gui.Contexts.BranchCommits.Files.Context) } func (gui *Gui) hasCommit(commits []*commands.Commit, target string) (int, bool) { |