Skip to content

Commit a3b583c

Browse files
fix off by one error with ellipsis (#113)
* fix off by one error with ellipsis * rev version
1 parent 3c189cd commit a3b583c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Microsoft.PowerShell.ConsoleGuiTools/GridViewHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static string GetPaddedString(List<string> strings, int offset, int[] lis
5858
// If the string won't fit in the column, append an ellipsis.
5959
if (strings[i].Length > listViewColumnWidths[i])
6060
{
61-
builder.Append(strings[i].Substring(0, listViewColumnWidths[i] - 4));
61+
builder.Append(strings[i], 0, listViewColumnWidths[i] - 3);
6262
builder.Append("...");
6363
}
6464
else

src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
RootModule = 'Microsoft.PowerShell.ConsoleGuiTools.dll'
1010

1111
# Version number of this module.
12-
ModuleVersion = '0.6.0'
12+
ModuleVersion = '0.6.1'
1313

1414
# Supported PSEditions
1515
CompatiblePSEditions = @( 'Core' )
@@ -106,6 +106,10 @@ PrivateData = @{
106106
# ReleaseNotes of this module
107107
ReleaseNotes = '# Release Notes
108108
109+
## v0.6.1
110+
111+
Fix off-by-one error with ellipsis so columns should be better aligned.
112+
109113
## v0.6.0
110114
111115
Now supports `-Filter` parameter.

0 commit comments

Comments
 (0)