1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-25 05:37:37 +03:00

refactor contexts

This commit is contained in:
Jesse Duffield
2022-02-05 17:04:10 +11:00
parent 145c69d9ae
commit d82f175e79
54 changed files with 1562 additions and 1248 deletions

View File

@@ -26,7 +26,7 @@ func (gui *Gui) refreshPatchBuildingPanel(selectedLineIdx int) error {
gui.Views.Secondary.Title = "Custom Patch"
// get diff from commit file that's currently selected
node := gui.getSelectedCommitFileNode()
node := gui.State.Contexts.CommitFiles.GetSelectedFileNode()
if node == nil {
return nil
}
@@ -87,7 +87,7 @@ func (gui *Gui) handleToggleSelectionForPatch() error {
}
// add range of lines to those set for the file
node := gui.getSelectedCommitFileNode()
node := gui.State.Contexts.CommitFiles.GetSelectedFileNode()
if node == nil {
return nil
}