mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-25 04:43:08 +03:00
centralise code for copying to clipboard
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user