enhance: append character U+26D4 to line when \ No newline at end of file is found in git diff output (#1197)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-04-16 11:41:40 +08:00
parent e9036b5fb9
commit db46de0261
No known key found for this signature in database
3 changed files with 28 additions and 10 deletions

View file

@ -1253,13 +1253,16 @@ namespace SourceGit.Views
{
builder.Append(line.Content.Substring(0, 1000));
builder.Append($"...({line.Content.Length - 1000} character trimmed)");
builder.Append('\n');
}
else
{
builder.Append(line.Content);
builder.Append('\n');
}
if (line.NoNewLineEndOfFile)
builder.Append("\u26D4");
builder.Append('\n');
}
Text = builder.ToString();
@ -1493,13 +1496,16 @@ namespace SourceGit.Views
{
builder.Append(line.Content.Substring(0, 1000));
builder.Append($"...({line.Content.Length - 1000} characters trimmed)");
builder.Append('\n');
}
else
{
builder.Append(line.Content);
builder.Append('\n');
}
if (line.NoNewLineEndOfFile)
builder.Append("\u26D4");
builder.Append('\n');
}
Text = builder.ToString();