mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Remove return value of IContextMgr.Push/Pop et. al.
This commit is contained in:
parent
072b465fa6
commit
371998e635
42 changed files with 137 additions and 162 deletions
|
@ -33,8 +33,8 @@ func (self *PatchBuildingHelper) ValidateNormalWorkingTreeState() (bool, error)
|
|||
}
|
||||
|
||||
// takes us from the patch building panel back to the commit files panel
|
||||
func (self *PatchBuildingHelper) Escape() error {
|
||||
return self.c.Context().Pop()
|
||||
func (self *PatchBuildingHelper) Escape() {
|
||||
self.c.Context().Pop()
|
||||
}
|
||||
|
||||
// kills the custom patch and returns us back to the commit files panel if needed
|
||||
|
@ -42,9 +42,7 @@ func (self *PatchBuildingHelper) Reset() error {
|
|||
self.c.Git().Patch.PatchBuilder.Reset()
|
||||
|
||||
if self.c.Context().CurrentStatic().GetKind() != types.SIDE_CONTEXT {
|
||||
if err := self.Escape(); err != nil {
|
||||
return err
|
||||
}
|
||||
self.Escape()
|
||||
}
|
||||
|
||||
if err := self.c.Refresh(types.RefreshOptions{
|
||||
|
@ -64,7 +62,8 @@ func (self *PatchBuildingHelper) RefreshPatchBuildingPanel(opts types.OnFocusOpt
|
|||
}
|
||||
|
||||
if !self.c.Git().Patch.PatchBuilder.Active() {
|
||||
return self.Escape()
|
||||
self.Escape()
|
||||
return nil
|
||||
}
|
||||
|
||||
// get diff from commit file that's currently selected
|
||||
|
@ -94,7 +93,8 @@ func (self *PatchBuildingHelper) RefreshPatchBuildingPanel(opts types.OnFocusOpt
|
|||
state := patch_exploring.NewState(diff, selectedLineIdx, oldState, self.c.Log)
|
||||
context.SetState(state)
|
||||
if state == nil {
|
||||
return self.Escape()
|
||||
self.Escape()
|
||||
return nil
|
||||
}
|
||||
|
||||
mainContent := context.GetContentToRender(true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue