diff options
Diffstat (limited to 'pkg/gui/context/branches_context.go')
-rw-r--r-- | pkg/gui/context/branches_context.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/gui/context/branches_context.go b/pkg/gui/context/branches_context.go index 0be6e1dce..4b82844f4 100644 --- a/pkg/gui/context/branches_context.go +++ b/pkg/gui/context/branches_context.go @@ -84,3 +84,12 @@ func (self *BranchesViewModel) GetSelected() *models.Branch { return self.getModel()[self.GetSelectedLineIdx()] } + +func (self *BranchesViewModel) GetSelectedRefName() string { + item := self.GetSelected() + if item == nil { + return "" + } + + return item.RefName() +} |