diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-18 08:26:40 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 0f7b2c45d773989229cb84a0147232962c6ae0e0 (patch) | |
tree | bec3948a7cc786d5d7fb6cf5cb2e6b14a832f6a8 /pkg/gui/patch_building_panel.go | |
parent | a12d18146ccd2847ef04377703baff58e209373d (diff) |
centralise split main panel code
Diffstat (limited to 'pkg/gui/patch_building_panel.go')
-rw-r--r-- | pkg/gui/patch_building_panel.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/gui/patch_building_panel.go b/pkg/gui/patch_building_panel.go index 6bd8949d2..67caba0ae 100644 --- a/pkg/gui/patch_building_panel.go +++ b/pkg/gui/patch_building_panel.go @@ -10,7 +10,7 @@ func (gui *Gui) refreshPatchBuildingPanel(selectedLineIdx int) error { return gui.handleEscapePatchBuildingPanel() } - gui.State.SplitMainPanel = true + gui.splitMainPanel(true) gui.getMainView().Title = "Patch" gui.getSecondaryView().Title = "Custom Patch" @@ -80,7 +80,7 @@ func (gui *Gui) handleEscapePatchBuildingPanel() error { if gui.GitCommand.PatchManager.IsEmpty() { gui.GitCommand.PatchManager.Reset() - gui.State.SplitMainPanel = false + gui.splitMainPanel(false) } return gui.switchContext(gui.Contexts.BranchCommits.Files.Context) @@ -88,7 +88,7 @@ func (gui *Gui) handleEscapePatchBuildingPanel() error { func (gui *Gui) refreshSecondaryPatchPanel() error { if gui.GitCommand.PatchManager.CommitSelected() { - gui.State.SplitMainPanel = true + gui.splitMainPanel(true) secondaryView := gui.getSecondaryView() secondaryView.Highlight = true secondaryView.Wrap = false @@ -98,7 +98,7 @@ func (gui *Gui) refreshSecondaryPatchPanel() error { return nil }) } else { - gui.State.SplitMainPanel = false + gui.splitMainPanel(false) } return nil |