refactor: improve diff handling for EOL changes and enhance text diff… (#1177)

* refactor: improve diff handling for EOL changes and enhance text diff display

- Updated `Diff.cs` to streamline whitespace handling in diff arguments.
- Enhanced `DiffContext.cs` to check for EOL changes when old and new hashes differ, creating a text diff if necessary.
- Added support for showing end-of-line symbols in `TextDiffView.axaml.cs` options.

* localization: update translations to include EOF handling in ignore whitespace messages

- Modified the ignore whitespace text in multiple language files to specify that EOF changes are also ignored.
- Ensured consistency across all localization files for the patch application feature.

* revert: Typo in DiffResult comment

* revert: update diff arguments to ignore CR at EOL in whitespace handling (like before changes)

* revert: update translations to remove EOF references in Text.Apply.IgnoreWS and fixed typo in Text.Diff.IgnoreWhitespace (EOF => EOL)

---------

Co-authored-by: mpagani <massimo.pagani@unitec-group.com>
This commit is contained in:
Massimo 2025-04-14 09:18:45 +02:00 committed by GitHub
parent e7f0217a7b
commit 81820e7034
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 57 additions and 13 deletions

View file

@ -745,6 +745,7 @@ namespace SourceGit.Views
var val = ShowHiddenSymbols;
Options.ShowTabs = val;
Options.ShowSpaces = val;
Options.ShowEndOfLine = val;
}
else if (change.Property == TabWidthProperty)
{