diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-29 14:34:17 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-03-29 18:26:24 +1100 |
commit | 40fbce91ce636eb037c2221946261ce4f4bf4317 (patch) | |
tree | 9c31eb84b24e6e742ef519a4dad89218cca8092e /pkg/gui/branches_panel.go | |
parent | 33d287d2f0c6335559ac75c1b9a4705dfaa9ad7b (diff) |
add new diff mode
WIP
WIP
WIP
WIP
WIP
WIP
WIP
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r-- | pkg/gui/branches_panel.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go index e2c09a4d8..c3bbcb059 100644 --- a/pkg/gui/branches_panel.go +++ b/pkg/gui/branches_panel.go @@ -42,6 +42,10 @@ func (gui *Gui) handleBranchSelect(g *gocui.Gui, v *gocui.View) error { branch := gui.getSelectedBranch() v.FocusPoint(0, gui.State.Panels.Branches.SelectedLine) + if gui.inDiffMode() { + return gui.renderDiff() + } + cmd := gui.OSCommand.ExecutableFromString( gui.GitCommand.GetBranchGraphCmdStr(branch.Name), ) @@ -85,7 +89,7 @@ func (gui *Gui) renderLocalBranchesWithSelection() error { branchesView := gui.getBranchesView() gui.refreshSelectedLine(&gui.State.Panels.Branches.SelectedLine, len(gui.State.Branches)) - displayStrings := presentation.GetBranchListDisplayStrings(gui.State.Branches, gui.State.ScreenMode != SCREEN_NORMAL) + displayStrings := presentation.GetBranchListDisplayStrings(gui.State.Branches, gui.State.ScreenMode != SCREEN_NORMAL, gui.State.Diff.Ref) gui.renderDisplayStrings(branchesView, displayStrings) if gui.g.CurrentView() == branchesView { if err := gui.handleBranchSelect(gui.g, branchesView); err != nil { |