mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Use a WithWaitingStatus for rewording a non-head commit
Rewording a commit at the beginning of a long branch can take very long; without this change, the commit message panel would stay visible with a blinking cursor during that time, which is very confusing. This has the slight downside that it will say "Rebasing" in the lower right corner until the operation is done; but we already have this problem when doing custom patch operations, or dropping changes from a commit, so it's not new, and we can think about how to fix all these another time.
This commit is contained in:
parent
eda65cbade
commit
c18d8af9f4
2 changed files with 9 additions and 5 deletions
|
@ -415,11 +415,13 @@ func (self *LocalCommitsController) handleReword(summary string, description str
|
|||
self.c.Tr.CommittingStatus, nil)
|
||||
}
|
||||
|
||||
err := self.c.Git().Rebase.RewordCommit(self.c.Model().Commits, self.c.Contexts().LocalCommits.GetSelectedLineIdx(), summary, description)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
|
||||
return self.c.WithWaitingStatus(self.c.Tr.RewordingStatus, func(gocui.Task) error {
|
||||
err := self.c.Git().Rebase.RewordCommit(self.c.Model().Commits, self.c.Contexts().LocalCommits.GetSelectedLineIdx(), summary, description)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
|
||||
})
|
||||
}
|
||||
|
||||
func (self *LocalCommitsController) doRewordEditor() error {
|
||||
|
|
|
@ -384,6 +384,7 @@ type TranslationSet struct {
|
|||
RedoingStatus string
|
||||
CheckingOutStatus string
|
||||
CommittingStatus string
|
||||
RewordingStatus string
|
||||
RevertingStatus string
|
||||
CreatingFixupCommitStatus string
|
||||
CommitFiles string
|
||||
|
@ -1425,6 +1426,7 @@ func EnglishTranslationSet() *TranslationSet {
|
|||
RedoingStatus: "Redoing",
|
||||
CheckingOutStatus: "Checking out",
|
||||
CommittingStatus: "Committing",
|
||||
RewordingStatus: "Rewording",
|
||||
RevertingStatus: "Reverting",
|
||||
CreatingFixupCommitStatus: "Creating fixup commit",
|
||||
CommitFiles: "Commit files",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue