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
352 B
Go
Raw Normal View History

package gui
func (gui *Gui) toggleWhitespaceInDiffView() error {
2022-01-28 11:44:36 +02:00
gui.IgnoreWhitespaceInDiffView = !gui.IgnoreWhitespaceInDiffView
toastMessage := gui.c.Tr.ShowingWhitespaceInDiffView
2022-01-28 11:44:36 +02:00
if gui.IgnoreWhitespaceInDiffView {
toastMessage = gui.c.Tr.IgnoringWhitespaceInDiffView
}
gui.c.Toast(toastMessage)
return gui.refreshFilesAndSubmodules()
}