mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
handling when to show the split panel
This commit is contained in:
@ -31,7 +31,7 @@ func (gui *Gui) refreshPatchBuildingPanel() error {
|
||||
}
|
||||
|
||||
if empty {
|
||||
return gui.handleStagingEscape(gui.g, nil)
|
||||
return gui.handleEscapePatchBuildingPanel(gui.g, nil)
|
||||
}
|
||||
|
||||
return nil
|
||||
@ -86,3 +86,20 @@ func (gui *Gui) handleEscapePatchBuildingPanel(g *gocui.Gui, v *gocui.View) erro
|
||||
|
||||
return gui.switchFocus(gui.g, nil, gui.getCommitFilesView())
|
||||
}
|
||||
|
||||
func (gui *Gui) refreshSecondaryPatchPanel() error {
|
||||
if gui.GitCommand.PatchManager != nil {
|
||||
gui.State.SplitMainPanel = true
|
||||
secondaryView := gui.getSecondaryView()
|
||||
secondaryView.Highlight = true
|
||||
secondaryView.Wrap = false
|
||||
|
||||
gui.g.Update(func(*gocui.Gui) error {
|
||||
return gui.setViewContent(gui.g, gui.getSecondaryView(), gui.GitCommand.PatchManager.RenderAggregatedPatchColored(false))
|
||||
})
|
||||
} else {
|
||||
gui.State.SplitMainPanel = false
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user