mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-03-21 21:47:32 +02:00
reduce glitchiness of patch building mode
This commit is contained in:
parent
48a244a923
commit
b3636a537b
@ -1,7 +1,6 @@
|
||||
package gui
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/controllers"
|
||||
)
|
||||
|
||||
@ -54,14 +53,6 @@ func (gui *Gui) SwitchToCommitFilesContext(opts controllers.SwitchToCommitFilesC
|
||||
}
|
||||
|
||||
func (gui *Gui) refreshCommitFilesContext() error {
|
||||
currentSideContext := gui.currentSideContext()
|
||||
if currentSideContext.GetKey() == context.COMMIT_FILES_CONTEXT_KEY ||
|
||||
currentSideContext.GetKey() == context.LOCAL_COMMITS_CONTEXT_KEY {
|
||||
if err := gui.handleRefreshPatchBuildingPanel(-1); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
to := gui.State.Contexts.CommitFiles.GetRefName()
|
||||
from, reverse := gui.State.Modes.Diffing.GetFromAndReverseArgsForDiff(to)
|
||||
|
||||
|
@ -90,6 +90,10 @@ func (gui *Gui) handleToggleSelectionForPatch() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := gui.handleRefreshPatchBuildingPanel(-1); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := gui.refreshCommitFilesContext(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -201,5 +201,10 @@ func (gui *Gui) handleResetPatch() error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if err := gui.handleEscapePatchBuildingPanel(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return gui.refreshCommitFilesContext()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user