2
0
Tig 1 жил өмнө
parent
commit
ce5fc1c81e

+ 9 - 4
Terminal.Gui/Text/TextFormatter.cs

@@ -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);

+ 1 - 1
UnitTests/View/Adornment/ShadowStyletests.cs

@@ -184,7 +184,7 @@ public class ShadowStyleTests (ITestOutputHelper _output)
                     """
                     01▖$
                     AB▌$
-                    !▀▘$
+                    ▀▘$
                     !@#$
                     """)]
     [InlineData (