1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/pkg/gui/stash_panel.go
2022-03-17 19:13:40 +11:00

19 lines
427 B
Go

package gui
func (gui *Gui) stashRenderToMain() error {
var task updateTask
stashEntry := gui.State.Contexts.Stash.GetSelected()
if stashEntry == nil {
task = NewRenderStringTask(gui.c.Tr.NoStashEntries)
} else {
task = NewRunPtyTask(gui.git.Stash.ShowStashEntryCmdObj(stashEntry.Index).GetCmd())
}
return gui.refreshMainViews(refreshMainOpts{
main: &viewUpdateOpts{
title: "Stash",
task: task,
},
})
}