summaryrefslogtreecommitdiffstats
path: root/pkg/gui/context/branches_context.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/context/branches_context.go')
-rw-r--r--pkg/gui/context/branches_context.go9
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()
+}