diff options
Diffstat (limited to 'pkg/gui/staging_panel.go')
-rw-r--r-- | pkg/gui/staging_panel.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pkg/gui/staging_panel.go b/pkg/gui/staging_panel.go index a9b351ba8..90e776024 100644 --- a/pkg/gui/staging_panel.go +++ b/pkg/gui/staging_panel.go @@ -105,11 +105,19 @@ func (gui *Gui) handleResetSelection(g *gocui.Gui, v *gocui.View) error { if !gui.Config.GetUserConfig().GetBool("gui.skipUnstageLineWarning") { return gui.ask(askOpts{ - title: gui.Tr.SLocalize("UnstageLinesTitle"), - prompt: gui.Tr.SLocalize("UnstageLinesPrompt"), + title: gui.Tr.SLocalize("UnstageLinesTitle"), + prompt: gui.Tr.SLocalize("UnstageLinesPrompt"), + handlersManageFocus: true, handleConfirm: func() error { + if err := gui.switchContext(gui.Contexts.Staging.Context); err != nil { + return err + } + return gui.applySelection(true) }, + handleClose: func() error { + return gui.switchContext(gui.Contexts.Staging.Context) + }, }) } else { return gui.applySelection(true) |