Browse Source

Actually add Environment.NewLine to the TextLayout for LineBreak runs

pull/8471/head
Benedikt Stebner 4 years ago
parent
commit
4ff9225f00
  1. 8
      src/Avalonia.Controls/Documents/LineBreak.cs

8
src/Avalonia.Controls/Documents/LineBreak.cs

@ -21,7 +21,13 @@ namespace Avalonia.Controls.Documents
internal override void BuildTextRun(IList<TextRun> textRuns)
{
textRuns.Add(new TextEndOfLine(Environment.NewLine.Length));
var text = Environment.NewLine.AsMemory();
var textRunProperties = CreateTextRunProperties();
var textCharacters = new TextCharacters(text, textRunProperties);
textRuns.Add(textCharacters);
}
internal override void AppendText(StringBuilder stringBuilder)

Loading…
Cancel
Save