Emit native line breaks

This commit is contained in:
Patrik Svensson
2020-08-16 13:47:57 +02:00
parent 5b33f80213
commit 4cfe55cc27
5 changed files with 16 additions and 23 deletions

View File

@ -70,6 +70,11 @@ namespace Spectre.Console.Internal
public static int GetCellLength(Encoding encoding, char rune)
{
if (rune == '\r' || rune == '\n')
{
return 0;
}
// Is it represented by a single byte?
// In that case we don't have to calculate the
// actual cell width.