From 02ff3fc91062e0e9c03bc52a288de99d976366ae Mon Sep 17 00:00:00 2001 From: Patrik Svensson Date: Tue, 15 Nov 2022 12:24:42 +0100 Subject: [PATCH] Fix alignment bug --- src/Spectre.Console/Widgets/Align.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Spectre.Console/Widgets/Align.cs b/src/Spectre.Console/Widgets/Align.cs index 9da88b41f..725b784ea 100644 --- a/src/Spectre.Console/Widgets/Align.cs +++ b/src/Spectre.Console/Widgets/Align.cs @@ -92,7 +92,7 @@ protected override IEnumerable Render(RenderOptions options, int maxWid { case VerticalAlignment.Top: { - var diff = Height - lines.Count; + var diff = height - lines.Count; for (var i = 0; i < diff; i++) { lines.Add(blank); @@ -121,7 +121,7 @@ protected override IEnumerable Render(RenderOptions options, int maxWid case VerticalAlignment.Bottom: { - var diff = Height - lines.Count; + var diff = height - lines.Count; for (var i = 0; i < diff; i++) { lines.Insert(0, blank);