1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Cleanup: remove diffFilesContext field of SwitchToDiffFilesController

I found this indirection confusing when reading the code. It looks like
SwitchToDiffFilesController is instantiated with different such contexts, but
it's always Contexts.CommitFiles, so just use that directly.
This commit is contained in:
Stefan Haller
2024-08-25 17:37:08 +02:00
parent c51e13941c
commit 770d51634c
2 changed files with 15 additions and 19 deletions

View File

@ -259,7 +259,7 @@ func (gui *Gui) resetHelpersAndControllers() {
gui.State.Contexts.Stash,
} {
controllers.AttachControllers(context, controllers.NewSwitchToDiffFilesController(
common, context, gui.State.Contexts.CommitFiles,
common, context,
))
}