mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-05 00:59:19 +02:00
Use sync waiting status for cherry-picking
This reduces flicker of the Files panel in the case that an auto-stash needs to be made.
This commit is contained in:
@ -3,7 +3,6 @@ package helpers
|
|||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/jesseduffield/gocui"
|
|
||||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/modes/cherrypicking"
|
"github.com/jesseduffield/lazygit/pkg/gui/modes/cherrypicking"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||||
@ -77,7 +76,7 @@ func (self *CherryPickHelper) Paste() error {
|
|||||||
"numCommits": strconv.Itoa(len(self.getData().CherryPickedCommits)),
|
"numCommits": strconv.Itoa(len(self.getData().CherryPickedCommits)),
|
||||||
}),
|
}),
|
||||||
HandleConfirm: func() error {
|
HandleConfirm: func() error {
|
||||||
return self.c.WithWaitingStatus(self.c.Tr.CherryPickingStatus, func(gocui.Task) error {
|
return self.c.WithWaitingStatusSync(self.c.Tr.CherryPickingStatus, func() error {
|
||||||
mustStash := IsWorkingTreeDirty(self.c.Model().Files)
|
mustStash := IsWorkingTreeDirty(self.c.Model().Files)
|
||||||
|
|
||||||
self.c.LogAction(self.c.Tr.Actions.CherryPick)
|
self.c.LogAction(self.c.Tr.Actions.CherryPick)
|
||||||
|
Reference in New Issue
Block a user