1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-09-16 09:16:26 +02:00

Replace PopContext() with Context().Pop()

This commit is contained in:
Stefan Haller
2024-08-08 10:18:37 +02:00
parent bd36b8a95e
commit 98335361fd
11 changed files with 12 additions and 17 deletions

View File

@@ -193,7 +193,7 @@ func (self *CommitsHelper) CloseCommitMessagePanel() error {
self.c.Views().CommitMessage.Visible = false
self.c.Views().CommitDescription.Visible = false
return self.c.PopContext()
return self.c.Context().Pop()
}
func (self *CommitsHelper) OpenCommitMenu(suggestionFunc func(string) []*types.Suggestion) error {

View File

@@ -28,7 +28,7 @@ func (self *ConfirmationHelper) wrappedConfirmationFunction(cancel goContext.Can
return func() error {
cancel()
if err := self.c.PopContext(); err != nil {
if err := self.c.Context().Pop(); err != nil {
return err
}

View File

@@ -34,7 +34,7 @@ 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.PopContext()
return self.c.Context().Pop()
}
// kills the custom patch and returns us back to the commit files panel if needed

View File

@@ -118,7 +118,7 @@ func (self *SearchHelper) Confirm() error {
case types.SearchTypeSearch:
return self.ConfirmSearch()
case types.SearchTypeNone:
return self.c.PopContext()
return self.c.Context().Pop()
}
return nil
@@ -140,7 +140,7 @@ func (self *SearchHelper) ConfirmFilter() error {
context.GetSearchHistory().Push(filterString)
}
return self.c.PopContext()
return self.c.Context().Pop()
}
func (self *SearchHelper) ConfirmSearch() error {
@@ -158,7 +158,7 @@ func (self *SearchHelper) ConfirmSearch() error {
context.GetSearchHistory().Push(searchString)
}
if err := self.c.PopContext(); err != nil {
if err := self.c.Context().Pop(); err != nil {
return err
}
@@ -183,7 +183,7 @@ func modelSearchResults(context types.ISearchableContext) []gocui.SearchPosition
func (self *SearchHelper) CancelPrompt() error {
self.Cancel()
return self.c.PopContext()
return self.c.Context().Pop()
}
func (self *SearchHelper) ScrollHistory(scrollIncrement int) {