1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

Move IgnoreWhitespaceInDiffView to AppState, and persist it when it changes

This commit is contained in:
Stefan Haller
2023-07-26 11:29:43 +02:00
parent 045bce5dfc
commit be667682f0
12 changed files with 17 additions and 26 deletions

View File

@ -105,9 +105,6 @@ type Gui struct {
IsNewRepo bool
// flag as to whether or not the diff view should ignore whitespace
IgnoreWhitespaceInDiffView bool
IsRefreshingFiles bool
// we use this to decide whether we'll return to the original directory that
@ -144,14 +141,6 @@ type StateAccessor struct {
var _ types.IStateAccessor = new(StateAccessor)
func (self *StateAccessor) GetIgnoreWhitespaceInDiffView() bool {
return self.gui.IgnoreWhitespaceInDiffView
}
func (self *StateAccessor) SetIgnoreWhitespaceInDiffView(value bool) {
self.gui.IgnoreWhitespaceInDiffView = value
}
func (self *StateAccessor) GetRepoPathStack() *utils.StringStack {
return self.gui.RepoPathStack
}