mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Rename suppressRebasingMode to suppressWorkingTreeStateMode
The mode it suppresses is active for any working tree state, not just a rebase: merging, cherry-picking and reverting show through the same indicator. Name it after what it hides.
This commit is contained in:
parent
f8b7bab1ab
commit
f4968f6839
|
|
@ -97,7 +97,7 @@ func (self *AppStatusHelper) WithWaitingStatusBlockingInput(message string, f fu
|
|||
// Hide the rebasing-mode indicator (and its reset button) while we drive the
|
||||
// rebase ourselves; it reflects the transient on-disk state and would
|
||||
// otherwise flash on for the duration of the operation.
|
||||
self.modeHelper.SetSuppressRebasingMode(true)
|
||||
self.modeHelper.SetSuppressWorkingTreeStateMode(true)
|
||||
self.c.OnWorker(func(task gocui.Task) error {
|
||||
// End the block and restore the mode indicator once the operation and its
|
||||
// refresh have applied their UI updates: OnUIThread queues this after the
|
||||
|
|
@ -105,7 +105,7 @@ func (self *AppStatusHelper) WithWaitingStatusBlockingInput(message string, f fu
|
|||
// enqueued by the time f returns), so the replayed keys act on the
|
||||
// refreshed state and any resulting rebase state shows correctly.
|
||||
defer self.c.OnUIThread(func() error {
|
||||
self.modeHelper.SetSuppressRebasingMode(false)
|
||||
self.modeHelper.SetSuppressWorkingTreeStateMode(false)
|
||||
return self.c.GocuiGui().EndBlockingEvents()
|
||||
})
|
||||
return self.WithWaitingStatusImpl(message, f, task)
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ import (
|
|||
type ModeHelper struct {
|
||||
c *HelperCommon
|
||||
|
||||
diffHelper *DiffHelper
|
||||
patchBuildingHelper *PatchBuildingHelper
|
||||
cherryPickHelper *CherryPickHelper
|
||||
mergeAndRebaseHelper *MergeAndRebaseHelper
|
||||
bisectHelper *BisectHelper
|
||||
suppressRebasingMode bool
|
||||
diffHelper *DiffHelper
|
||||
patchBuildingHelper *PatchBuildingHelper
|
||||
cherryPickHelper *CherryPickHelper
|
||||
mergeAndRebaseHelper *MergeAndRebaseHelper
|
||||
bisectHelper *BisectHelper
|
||||
suppressWorkingTreeStateMode bool
|
||||
}
|
||||
|
||||
func NewModeHelper(
|
||||
|
|
@ -130,7 +130,7 @@ func (self *ModeHelper) Statuses() []ModeStatus {
|
|||
},
|
||||
{
|
||||
IsActive: func() bool {
|
||||
return !self.suppressRebasingMode && self.c.Git().Status.WorkingTreeState().Any()
|
||||
return !self.suppressWorkingTreeStateMode && self.c.Git().Status.WorkingTreeState().Any()
|
||||
},
|
||||
InfoLabel: func() string {
|
||||
workingTreeState := self.c.Git().Status.WorkingTreeState()
|
||||
|
|
@ -219,6 +219,6 @@ func ScopesToRefreshWhenFilteringModeChanges() []types.RefreshableView {
|
|||
}
|
||||
}
|
||||
|
||||
func (self *ModeHelper) SetSuppressRebasingMode(value bool) {
|
||||
self.suppressRebasingMode = value
|
||||
func (self *ModeHelper) SetSuppressWorkingTreeStateMode(value bool) {
|
||||
self.suppressWorkingTreeStateMode = value
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue