mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-15 01:34:26 +02:00
Show stash title in main view for selected stash entry
This commit is contained in:
@ -3,6 +3,7 @@ package controllers
|
|||||||
import (
|
import (
|
||||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/gui/style"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||||
)
|
)
|
||||||
@ -82,8 +83,10 @@ func (self *StashController) GetOnRenderToMain() func() {
|
|||||||
if stashEntry == nil {
|
if stashEntry == nil {
|
||||||
task = types.NewRenderStringTask(self.c.Tr.NoStashEntries)
|
task = types.NewRenderStringTask(self.c.Tr.NoStashEntries)
|
||||||
} else {
|
} else {
|
||||||
task = types.NewRunPtyTask(
|
prefix := style.FgYellow.Sprintf("%s\n\n", stashEntry.Description())
|
||||||
|
task = types.NewRunPtyTaskWithPrefix(
|
||||||
self.c.Git().Stash.ShowStashEntryCmdObj(stashEntry.Index).GetCmd(),
|
self.c.Git().Stash.ShowStashEntryCmdObj(stashEntry.Index).GetCmd(),
|
||||||
|
prefix,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user