summaryrefslogtreecommitdiffstats
path: root/pkg/gui/context.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-22 12:07:03 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commit438abd6003aff9621f93b8531aa20baad2c8933c (patch)
tree90c3f24a7a604ca057960a23ee4d98d1c95b4e5f /pkg/gui/context.go
parent442f6cd854d972c3797ca203c8de6943fe81d2ca (diff)
centralise code for copying to clipboard
Diffstat (limited to 'pkg/gui/context.go')
-rw-r--r--pkg/gui/context.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/gui/context.go b/pkg/gui/context.go
index e5018b26b..e3a90871b 100644
--- a/pkg/gui/context.go
+++ b/pkg/gui/context.go
@@ -693,3 +693,12 @@ func (gui *Gui) getCurrentSideView() *gocui.View {
return view
}
+
+func (gui *Gui) getSideContextSelectedItem() ListItem {
+ currentSideContext := gui.currentSideContext()
+ if currentSideContext == nil {
+ return nil
+ }
+
+ return currentSideContext.GetSelectedItem()
+}