mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
WIP
This commit is contained in:
@ -80,13 +80,14 @@ func (gui *Gui) handleEscapePatchBuildingPanel() error {
|
||||
|
||||
if gui.GitCommand.PatchManager.IsEmpty() {
|
||||
gui.GitCommand.PatchManager.Reset()
|
||||
gui.splitMainPanel(false)
|
||||
}
|
||||
|
||||
return gui.switchContext(gui.Contexts.BranchCommits.Files.Context)
|
||||
}
|
||||
|
||||
func (gui *Gui) refreshSecondaryPatchPanel() error {
|
||||
// TODO: swap out for secondaryPatchPanelUpdateOpts
|
||||
|
||||
if gui.GitCommand.PatchManager.CommitSelected() {
|
||||
gui.splitMainPanel(true)
|
||||
secondaryView := gui.getSecondaryView()
|
||||
@ -103,3 +104,18 @@ func (gui *Gui) refreshSecondaryPatchPanel() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (gui *Gui) secondaryPatchPanelUpdateOpts() *viewUpdateOpts {
|
||||
if gui.GitCommand.PatchManager.CommitSelected() {
|
||||
patch := gui.GitCommand.PatchManager.RenderAggregatedPatchColored(false)
|
||||
|
||||
return &viewUpdateOpts{
|
||||
title: "Custom Patch",
|
||||
noWrap: true,
|
||||
highlight: true,
|
||||
task: gui.createRenderStringWithoutScrollTask(patch),
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user