summaryrefslogtreecommitdiffstats
path: root/pkg/gui/commit_files_panel.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/commit_files_panel.go')
-rw-r--r--pkg/gui/commit_files_panel.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/gui/commit_files_panel.go b/pkg/gui/commit_files_panel.go
index 42afc6c94..b4a08625a 100644
--- a/pkg/gui/commit_files_panel.go
+++ b/pkg/gui/commit_files_panel.go
@@ -29,7 +29,9 @@ func (gui *Gui) handleCommitFileSelect(g *gocui.Gui, v *gocui.View) error {
}
gui.getMainView().Title = "Patch"
- gui.State.Panels.LineByLine = nil
+ if gui.currentViewName() == "commitFiles" {
+ gui.handleEscapeLineByLinePanel()
+ }
commitFile := gui.getSelectedCommitFile(g)
if commitFile == nil {
@@ -194,9 +196,7 @@ func (gui *Gui) enterCommitFile(selectedLineIdx int) error {
}
}
- if err := gui.changeMainViewsContext("patch-building"); err != nil {
- return err
- }
+ gui.changeMainViewsContext("patch-building")
if err := gui.switchFocus(gui.g, gui.getCommitFilesView(), gui.getMainView()); err != nil {
return err
}