refactor: rewrite the way reading full message of commit

This commit is contained in:
leo 2024-12-13 11:00:03 +08:00
parent a99bd2e973
commit 751991c816
No known key found for this signature in database
2 changed files with 11 additions and 8 deletions

View file

@ -95,7 +95,7 @@ namespace SourceGit.Views
if (change.Property == TextProperty && _changingWay == TextChangeWay.None)
{
_changingWay = TextChangeWay.FromSource;
var normalized = Text.ReplaceLineEndings("\n").Trim();
var normalized = Text.ReplaceLineEndings("\n");
var subjectEnd = normalized.IndexOf("\n\n", StringComparison.Ordinal);
if (subjectEnd == -1)
{