1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

centralise code for copying to clipboard

This commit is contained in:
Jesse Duffield
2020-08-22 12:07:03 +10:00
parent 442f6cd854
commit 438abd6003
5 changed files with 36 additions and 20 deletions

View File

@ -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()
}