From 18aed8797734b1ae3dc3ef94cd5385209aed517e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 25 Feb 2024 18:45:01 +0000 Subject: [PATCH] feat: Posh.Host.UI.Box.TopWall ( Fixes #369 ) Only grabbing one character --- Posh.types.ps1xml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Posh.types.ps1xml b/Posh.types.ps1xml index 426db30..28dcb57 100644 --- a/Posh.types.ps1xml +++ b/Posh.types.ps1xml @@ -1824,7 +1824,6 @@ $theseLines[0].Substring($theseLines[0].Length - 1) Gets a box's top wall character .DESCRIPTION Gets the top wall in a box. - .NOTES If the box only has one line, and it is less than 5 characters, the second character will be considered the top wall. @@ -1840,7 +1839,7 @@ if ($theLine.Length -lt 5) { # If there is only one line, it is between two and five characters if ($theLine.Length -ge 2) { # pick the second character as the top wall - $theLine.Substring(1,2) + $theLine.Substring(1,1) } else { # (if there was only one character, it's the top wall) $theLine.Substring(0,1) @@ -1849,12 +1848,6 @@ if ($theLine.Length -lt 5) { # Otherwise, pick one left of the middle in the line $theLine[[Math]::Floor($theLine.Length / 2) - 1] } - - - - - -