1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-25 00:46:54 +02:00

centralise code for copying to clipboard

This commit is contained in:
Jesse Duffield
2020-08-22 12:07:03 +10:00
parent 442f6cd854
commit 438abd6003
5 changed files with 36 additions and 20 deletions

View File

@ -460,15 +460,6 @@ func (gui *Gui) currentBranch() *commands.Branch {
return gui.State.Branches[0]
}
func (gui *Gui) handleClipboardCopyBranch(g *gocui.Gui, v *gocui.View) error {
branch := gui.getSelectedBranch()
if branch == nil {
return nil
}
return gui.OSCommand.CopyToClipboard(branch.Name)
}
func (gui *Gui) handleNewBranchOffCurrentItem() error {
context := gui.currentSideContext()