summaryrefslogtreecommitdiffstats
path: root/pkg/gui/staging_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-16 13:58:29 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commit7f89113245307be8a1642105014e9ce51a47210f (patch)
tree0b1237c4bdd4a465bedb7cc49c8372d0bfc46ea5 /pkg/gui/staging_panel.go
parent0ea0c486310558e26af7ad6e4fcf17f57c2b62e3 (diff)
WIP
Diffstat (limited to 'pkg/gui/staging_panel.go')
-rw-r--r--pkg/gui/staging_panel.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/gui/staging_panel.go b/pkg/gui/staging_panel.go
index 0496fed96..5fc8fe9dc 100644
--- a/pkg/gui/staging_panel.go
+++ b/pkg/gui/staging_panel.go
@@ -12,12 +12,12 @@ func (gui *Gui) refreshStagingPanel(forceSecondaryFocused bool, selectedLineIdx
state := gui.State.Panels.LineByLine
- // We need to force focus here because the confirmation panel for safely staging lines does not return focus automatically.
- // This is because if we tell it to return focus it will unconditionally return it to the main panel which may not be what we want
- // e.g. in the event that there's nothing left to stage.
- if err := gui.switchFocus(nil, gui.getMainView()); err != nil {
- return err
- }
+ // // We need to force focus here because the confirmation panel for safely staging lines does not return focus automatically.
+ // // This is because if we tell it to return focus it will unconditionally return it to the main panel which may not be what we want
+ // // e.g. in the event that there's nothing left to stage.
+ // if err := gui.switchContext(nil, gui.getMainView()); err != nil {
+ // return err
+ // }
file, err := gui.getSelectedFile()
if err != nil {
@@ -96,7 +96,7 @@ func (gui *Gui) handleTogglePanel(g *gocui.Gui, v *gocui.View) error {
func (gui *Gui) handleStagingEscape() error {
gui.handleEscapeLineByLinePanel()
- return gui.switchFocus(nil, gui.getFilesView())
+ return gui.switchContext(gui.Contexts.Files.Context)
}
func (gui *Gui) handleToggleStagedSelection(g *gocui.Gui, v *gocui.View) error {