diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-22 10:17:09 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 134566ed49718b5ff73d74f22a3cc743371c57d6 (patch) | |
tree | dd3e0def7241e64caa7184005cc011aa2328a63c /pkg/gui/commits_panel.go | |
parent | 8da93fd76287d16156308896ef162e9749fcd27f (diff) |
move into more appropriate file
Diffstat (limited to 'pkg/gui/commits_panel.go')
-rw-r--r-- | pkg/gui/commits_panel.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index 5e1c55c58..513d3f29a 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -674,37 +674,3 @@ func (gui *Gui) handleClipboardCopyCommit(g *gocui.Gui, v *gocui.View) error { return gui.OSCommand.CopyToClipboard(commit.Sha) } - -func (gui *Gui) handleNewBranchOffCurrentItem() error { - context := gui.currentSideContext() - - itemId := context.GetSelectedItemId() - - message := gui.Tr.TemplateLocalize( - "NewBranchNameBranchOff", - Teml{ - "branchName": itemId, // TODO: add 'long name' field on ListItem interface (right now we just get an ugly commit SHA for commits) - }, - ) - - return gui.prompt(gui.getCurrentSideView(), message, "", func(response string) error { - if err := gui.GitCommand.NewBranch(response, itemId); err != nil { - return err - } - - // if we're currently in the branch commits context then the selected commit - // is about to go to the top of the list - if context.GetKey() == BRANCH_COMMITS_CONTEXT_KEY { - context.GetPanelState().SetSelectedLineIdx(0) - } - - if context.GetKey() != gui.Contexts.Branches.Context.GetKey() { - if err := gui.switchContext(gui.Contexts.Branches.Context); err != nil { - return err - } - gui.State.Panels.Branches.SelectedLineIdx = 0 - } - - return gui.refreshSidePanels(refreshOptions{mode: ASYNC}) - }) -} |