2021-06-11 14:34:00 +02:00
|
|
|
package gui
|
|
|
|
|
|
|
|
func (gui *Gui) toggleWhitespaceInDiffView() error {
|
2022-01-28 11:44:36 +02:00
|
|
|
gui.IgnoreWhitespaceInDiffView = !gui.IgnoreWhitespaceInDiffView
|
2021-06-11 14:34:00 +02:00
|
|
|
|
2022-01-16 05:46:53 +02:00
|
|
|
toastMessage := gui.c.Tr.ShowingWhitespaceInDiffView
|
2022-01-28 11:44:36 +02:00
|
|
|
if gui.IgnoreWhitespaceInDiffView {
|
2022-01-16 05:46:53 +02:00
|
|
|
toastMessage = gui.c.Tr.IgnoringWhitespaceInDiffView
|
2021-06-11 14:34:00 +02:00
|
|
|
}
|
2022-01-16 05:46:53 +02:00
|
|
|
gui.c.Toast(toastMessage)
|
2021-06-11 14:34:00 +02:00
|
|
|
|
|
|
|
return gui.refreshFilesAndSubmodules()
|
|
|
|
}
|