mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-02 20:30:25 -06:00
Nothing routes to the explorer contexts after line actions and file entry moved into the normal main pair. Delete their contexts, views, main-pair wiring, discovery API, test drivers, and selection-state package so the surviving diff view is the only implementation. Their names go from the contexts a custom command may bind to as well, so that a config still naming one is reported as the config error it now is rather than taken as a context we simply failed to find. Co-Authored-By: GitHub Copilot <copilot@github.com>
19 lines
802 B
Go
19 lines
802 B
Go
package controllers
|
|
|
|
type ToggleWhitespaceAction struct {
|
|
c *ControllerCommon
|
|
}
|
|
|
|
func (self *ToggleWhitespaceAction) Call() error {
|
|
self.c.UserConfig().Git.IgnoreWhitespaceInDiffView = !self.c.UserConfig().Git.IgnoreWhitespaceInDiffView
|
|
|
|
// You toggle this to see whether what you are looking at is more than
|
|
// reindentation, so that is the thing to keep in front of you — even though
|
|
// ignoring whitespace, unlike the other ways of re-rendering a diff, can take
|
|
// the line away entirely along with the hunk or file it was in.
|
|
self.c.Helpers().DiffLine.PreserveDiffPositionOnRerender(self.c.Contexts().Normal.GetView())
|
|
self.c.Helpers().DiffLine.PreserveDiffPositionOnRerender(self.c.Contexts().NormalSecondary.GetView())
|
|
self.c.Context().CurrentSide().HandleRenderToMain()
|
|
return nil
|
|
}
|