Skip to content

Commit 92c9eb6

Browse files
committed
Show stash title in main view for selected stash entry
1 parent ef16867 commit 92c9eb6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/gui/controllers/stash_controller.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package controllers
33
import (
44
"github.com/jesseduffield/lazygit/pkg/commands/models"
55
"github.com/jesseduffield/lazygit/pkg/gui/context"
6+
"github.com/jesseduffield/lazygit/pkg/gui/style"
67
"github.com/jesseduffield/lazygit/pkg/gui/types"
78
"github.com/jesseduffield/lazygit/pkg/utils"
89
)
@@ -82,8 +83,10 @@ func (self *StashController) GetOnRenderToMain() func() {
8283
if stashEntry == nil {
8384
task = types.NewRenderStringTask(self.c.Tr.NoStashEntries)
8485
} else {
85-
task = types.NewRunPtyTask(
86+
prefix := style.FgYellow.Sprintf("%s\n\n", stashEntry.Description())
87+
task = types.NewRunPtyTaskWithPrefix(
8688
self.c.Git().Stash.ShowStashEntryCmdObj(stashEntry.Index).GetCmd(),
89+
prefix,
8790
)
8891
}
8992

0 commit comments

Comments
 (0)