mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-10-25 05:37:37 +03:00
refactor contexts
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user