1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-01 22:52:01 +02:00

simplify how the context system works

This commit is contained in:
Jesse Duffield
2019-11-10 16:33:31 +11:00
parent e85310c0a9
commit 131113b065
11 changed files with 362 additions and 374 deletions

View File

@@ -29,6 +29,7 @@ func (gui *Gui) handleCommitFileSelect(g *gocui.Gui, v *gocui.View) error {
}
gui.getMainView().Title = "Patch"
gui.State.Panels.LineByLine = nil
commitFile := gui.getSelectedCommitFile(g)
if commitFile == nil {
@@ -207,10 +208,7 @@ func (gui *Gui) enterCommitFile(selectedLineIdx int) error {
}
}
if err := gui.changeContext("main", "patch-building"); err != nil {
return err
}
if err := gui.changeContext("secondary", "patch-building"); err != nil {
if err := gui.changeContext("patch-building"); err != nil {
return err
}
if err := gui.switchFocus(gui.g, gui.getCommitFilesView(), gui.getMainView()); err != nil {