File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,8 @@ function GetListRecursive {
78
78
$Wrap = @ {
79
79
Width = $Host.UI.RawUI.BufferSize.Width - 2
80
80
IndentPadding = " "
81
- HangingIndent = " "
81
+ WrappedIndent = " "
82
+ Colors = $LineColors
82
83
}
83
84
$null = $output.Append (($prop.Value | WrapString @Wrap ))
84
85
} elseif ($prop.Name -eq ' HResult' ) {
@@ -111,9 +112,9 @@ function GetListRecursive {
111
112
112
113
if ($value -is [Type ]) {
113
114
# Just show the typename instead of it as an object
114
- $null = $output.Append (" ${nextPadding} [$ ( $value.ToString ()) ]" )
115
+ $null = $output.Append (" [$ ( $value.ToString ()) ]" )
115
116
} elseif ($value -is [string ] -or $value.GetType ().IsPrimitive) {
116
- $null = $output.Append (" ${nextPadding}${ value} " )
117
+ $null = $output.Append (" ${value} " )
117
118
} else {
118
119
if (! $isFirstElement ) {
119
120
$null = $output.Append ($newline )
@@ -141,10 +142,14 @@ function GetListRecursive {
141
142
}
142
143
$Wrap = @ {
143
144
Width = $Host.UI.RawUI.BufferSize.Width - 2
145
+ # Because the first line contains the property name, we don't want to indent it
146
+ FirstLineIndent = ' '
147
+ # But all other lines (including wrapped lines) should be indented to align
144
148
IndentPadding = " " * ($nextIndent + $prop.Name.Length )
149
+ Colors = $LineColors
145
150
}
146
151
147
- $null = $output.Append (($value | WrapString @Wrap ).TrimStart() )
152
+ $null = $output.Append (($value | WrapString @Wrap ))
148
153
}
149
154
}
150
155
You can’t perform that action at this time.
0 commit comments