Fixed ShadowTests

This commit is contained in:
Tig
2024-07-16 09:43:34 -06:00
parent 06339c98fe
commit ce5fc1c81e
2 changed files with 10 additions and 5 deletions

View File

@@ -662,13 +662,18 @@ public class TextFormatter
return Size.Empty;
}
int width = lines.Max (static line => line.GetColumns ());
int height = lines.Count;
int width;
int height;
if (IsVerticalDirection (Direction))
{
height = GetColumnsRequiredForVerticalText(lines, 0, lines.Count, TabWidth);
return new (height, lines.Max (static line => line.Length));
width = GetColumnsRequiredForVerticalText (lines, 0, lines.Count, TabWidth);
height = lines.Max (static line => line.Length);
}
else
{
width = lines.Max (static line => line.GetColumns());
height = lines.Count;
}
return new (width, height);