1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-09-16 09:16:26 +02:00

add contexts to views

This commit is contained in:
Jesse Duffield
2019-11-16 12:41:04 +11:00
parent 44bbc106a9
commit 7e0a8f235e
13 changed files with 531 additions and 486 deletions

View File

@@ -216,7 +216,7 @@ func (gui *Gui) enterFile(forceSecondaryFocused bool, selectedLineIdx int) error
if file.HasMergeConflicts {
return gui.createErrorPanel(gui.g, gui.Tr.SLocalize("FileStagingRequirements"))
}
if err := gui.changeContext("staging"); err != nil {
if err := gui.changeMainViewsContext("staging"); err != nil {
return err
}
if err := gui.switchFocus(gui.g, gui.getFilesView(), gui.getMainView()); err != nil {
@@ -510,7 +510,7 @@ func (gui *Gui) handleSwitchToMerge(g *gocui.Gui, v *gocui.View) error {
if !file.HasInlineMergeConflicts {
return gui.createErrorPanel(g, gui.Tr.SLocalize("FileNoMergeCons"))
}
if err := gui.changeContext("merging"); err != nil {
if err := gui.changeMainViewsContext("merging"); err != nil {
return err
}
if err := gui.switchFocus(g, v, gui.getMainView()); err != nil {