diff options
Diffstat (limited to 'pkg/gui/stash_panel.go')
-rw-r--r-- | pkg/gui/stash_panel.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pkg/gui/stash_panel.go b/pkg/gui/stash_panel.go index 8ccdc9880..23ecaba60 100644 --- a/pkg/gui/stash_panel.go +++ b/pkg/gui/stash_panel.go @@ -34,16 +34,19 @@ func (gui *Gui) handleStashEntrySelect(g *gocui.Gui, v *gocui.View) error { stashEntry := gui.getSelectedStashEntry(v) if stashEntry == nil { - return gui.renderString(g, "main", gui.Tr.SLocalize("NoStashEntries")) + return gui.newStringTask("main", gui.Tr.SLocalize("NoStashEntries")) } if err := gui.focusPoint(0, gui.State.Panels.Stash.SelectedLine, len(gui.State.StashEntries), v); err != nil { return err } - go func() { - // doing this asynchronously cos it can take time - diff, _ := gui.GitCommand.GetStashEntryDiff(stashEntry.Index) - _ = gui.renderString(g, "main", diff) - }() + + cmd := gui.OSCommand.ExecutableFromString( + gui.GitCommand.ShowStashEntryCmdStr(stashEntry.Index), + ) + if err := gui.newCmdTask("main", cmd); err != nil { + gui.Log.Error(err) + } + return nil } |