@@ -25,6 +25,12 @@ public bool IsTextDiff
2525 private set => SetProperty ( ref _isTextDiff , value ) ;
2626 }
2727
28+ public bool IsIgnoreWhitespaceVisible
29+ {
30+ get => _isIgnoreWhitespaceVisible ;
31+ private set => SetProperty ( ref _isIgnoreWhitespaceVisible , value ) ;
32+ }
33+
2834 public object Content
2935 {
3036 get => _content ;
@@ -45,6 +51,7 @@ public DiffContext(string repo, Models.DiffOption option, DiffContext previous =
4551 if ( previous != null )
4652 {
4753 _isTextDiff = previous . _isTextDiff ;
54+ _isIgnoreWhitespaceVisible = previous . _isIgnoreWhitespaceVisible ;
4855 _content = previous . _content ;
4956 _fileModeChange = previous . _fileModeChange ;
5057 _unifiedLines = previous . _unifiedLines ;
@@ -236,6 +243,7 @@ private void LoadContent()
236243 if ( rs is Models . TextDiff cur )
237244 {
238245 IsTextDiff = true ;
246+ IsIgnoreWhitespaceVisible = true ;
239247
240248 if ( Preferences . Instance . UseSideBySideDiff )
241249 Content = new TwoSideTextDiff ( _option , cur , _content as TextDiffContext ) ;
@@ -245,6 +253,7 @@ private void LoadContent()
245253 else
246254 {
247255 IsTextDiff = false ;
256+ IsIgnoreWhitespaceVisible = ( rs is Models . NoOrEOLChange ) ;
248257 Content = rs ;
249258 }
250259 } ) ;
@@ -323,6 +332,7 @@ public bool IsSame(Info other)
323332 private string _fileModeChange = string . Empty ;
324333 private int _unifiedLines = 4 ;
325334 private bool _isTextDiff = false ;
335+ private bool _isIgnoreWhitespaceVisible = true ;
326336 private object _content = null ;
327337 private Info _info = null ;
328338 }
0 commit comments