summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-02-22 20:17:26 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commit120078f0112b64b201cf038b09f0cb00b8421d72 (patch)
treee08785c3a38926dc34a4d1799cfd8da63594443f /pkg
parentecaff7fc6cc3d2e510a88e336abcb74567de3f12 (diff)
use PopContext
Diffstat (limited to 'pkg')
-rw-r--r--pkg/gui/commit_message_panel.go4
-rw-r--r--pkg/gui/confirmation_panel.go2
-rw-r--r--pkg/gui/credentials_panel.go4
-rw-r--r--pkg/gui/extras_panel.go2
-rw-r--r--pkg/gui/menu_panel.go2
-rw-r--r--pkg/gui/searching.go4
6 files changed, 9 insertions, 9 deletions
diff --git a/pkg/gui/commit_message_panel.go b/pkg/gui/commit_message_panel.go
index b59111fe2..071503a6b 100644
--- a/pkg/gui/commit_message_panel.go
+++ b/pkg/gui/commit_message_panel.go
@@ -18,7 +18,7 @@ func (gui *Gui) handleCommitConfirm() error {
cmdObj := gui.git.Commit.CommitCmdObj(message)
gui.c.LogAction(gui.c.Tr.Actions.Commit)
- _ = gui.returnFromContext()
+ _ = gui.c.PopContext()
return gui.withGpgHandling(cmdObj, gui.c.Tr.CommittingStatus, func() error {
gui.Views.CommitMessage.ClearTextArea()
gui.State.failedCommitMessage = ""
@@ -27,7 +27,7 @@ func (gui *Gui) handleCommitConfirm() error {
}
func (gui *Gui) handleCommitClose() error {
- return gui.returnFromContext()
+ return gui.c.PopContext()
}
func (gui *Gui) handleCommitMessageFocused() error {
diff --git a/pkg/gui/confirmation_panel.go b/pkg/gui/confirmation_panel.go
index b2cfabfab..15e5a8f45 100644
--- a/pkg/gui/confirmation_panel.go
+++ b/pkg/gui/confirmation_panel.go
@@ -50,7 +50,7 @@ func (gui *Gui) closeConfirmationPrompt(handlersManageFocus bool) error {
}
if !handlersManageFocus {
- if err := gui.returnFromContext(); err != nil {
+ if err := gui.c.PopContext(); err != nil {
return err
}
}
diff --git a/pkg/gui/credentials_panel.go b/pkg/gui/credentials_panel.go
index 796aa70c6..1277ac8ef 100644
--- a/pkg/gui/credentials_panel.go
+++ b/pkg/gui/credentials_panel.go
@@ -44,7 +44,7 @@ func (gui *Gui) handleSubmitCredential() error {
message := strings.TrimSpace(credentialsView.TextArea.GetContent())
gui.credentials <- message
credentialsView.ClearTextArea()
- if err := gui.returnFromContext(); err != nil {
+ if err := gui.c.PopContext(); err != nil {
return err
}
@@ -54,7 +54,7 @@ func (gui *Gui) handleSubmitCredential() error {
func (gui *Gui) handleCloseCredentialsView() error {
gui.Views.Credentials.ClearTextArea()
gui.credentials <- ""
- return gui.returnFromContext()
+ return gui.c.PopContext()
}
func (gui *Gui) handleAskFocused() error {
diff --git a/pkg/gui/extras_panel.go b/pkg/gui/extras_panel.go
index bb0eaf934..462a5118e 100644
--- a/pkg/gui/extras_panel.go
+++ b/pkg/gui/extras_panel.go
@@ -17,7 +17,7 @@ func (gui *Gui) handleCreateExtrasMenuPanel() error {
OnPress: func() error {
currentContext := gui.currentStaticContext()
if gui.ShowExtrasWindow && currentContext.GetKey() == context.COMMAND_LOG_CONTEXT_KEY {
- if err := gui.returnFromContext(); err != nil {
+ if err := gui.c.PopContext(); err != nil {
return err
}
}
diff --git a/pkg/gui/menu_panel.go b/pkg/gui/menu_panel.go
index 4afe931d1..e787162ed 100644
--- a/pkg/gui/menu_panel.go
+++ b/pkg/gui/menu_panel.go
@@ -19,7 +19,7 @@ func (gui *Gui) getMenuOptions() map[string]string {
}
func (gui *Gui) handleMenuClose() error {
- return gui.returnFromContext()
+ return gui.c.PopContext()
}
// note: items option is mutated by this function
diff --git a/pkg/gui/searching.go b/pkg/gui/searching.go
index 25a3ff63a..c38c77e0a 100644
--- a/pkg/gui/searching.go
+++ b/pkg/gui/searching.go
@@ -26,7 +26,7 @@ func (gui *Gui) handleOpenSearch(viewName string) error {
func (gui *Gui) handleSearch() error {
gui.State.Searching.searchString = gui.Views.Search.TextArea.GetContent()
- if err := gui.returnFromContext(); err != nil {
+ if err := gui.c.PopContext(); err != nil {
return err
}
@@ -93,7 +93,7 @@ func (gui *Gui) handleSearchEscape() error {
return err
}
- if err := gui.returnFromContext(); err != nil {
+ if err := gui.c.PopContext(); err != nil {
return err
}