1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/pkg/gui/whitespace-toggle.go

14 lines
369 B
Go

package gui
func (gui *Gui) toggleWhitespaceInDiffView() error {
gui.State.IgnoreWhitespaceInDiffView = !gui.State.IgnoreWhitespaceInDiffView
toastMessage := gui.Tr.ShowingWhitespaceInDiffView
if gui.State.IgnoreWhitespaceInDiffView {
toastMessage = gui.Tr.IgnoringWhitespaceInDiffView
}
gui.raiseToast(toastMessage)
return gui.refreshFilesAndSubmodules()
}