diff options
Diffstat (limited to 'pkg/gui/branches_panel.go')
-rw-r--r-- | pkg/gui/branches_panel.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/gui/branches_panel.go b/pkg/gui/branches_panel.go index c3bbcb059..75c01d0e1 100644 --- a/pkg/gui/branches_panel.go +++ b/pkg/gui/branches_panel.go @@ -520,3 +520,12 @@ 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) +} |