Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ private void ProcessObject(PSObject so)
}
Comment thread
iSazonov marked this conversation as resolved.
Outdated
Comment thread
iSazonov marked this conversation as resolved.
Outdated
Comment thread
iSazonov marked this conversation as resolved.
Outdated
Comment thread
iSazonov marked this conversation as resolved.
Outdated
else if (transition == GroupTransition.startNew)
{
// Add newline before each group except first
WriteNewLineObject();

// double transition
PopGroup(); // exit the current one
PushGroup(so); // start a sibling group
Expand All @@ -273,6 +276,23 @@ private void ProcessObject(PSObject so)
}
}

private void WriteNewLineObject()
{
FormatEntryData fed = new FormatEntryData();
fed.outOfBand = true;
Comment thread
SteveL-MSFT marked this conversation as resolved.

ComplexViewEntry cve = new ComplexViewEntry();
FormatEntry fe = new FormatEntry();
cve.formatValueList.Add(fe);

// Formating system writes newline before each object
// so no need to add newline here like:
// fe.formatValueList.Add(new FormatNewLine());
fed.formatEntryInfo = cve;

this.WriteObject(fed);
}

private bool ShouldProcessOutOfBand
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,6 @@ private void ProcessGroupStart(FormatMessagesContextManager.OutputContext c)

if (goc.Data.groupingEntry != null)
{
_lo.WriteLine(string.Empty);

ComplexWriter writer = new ComplexWriter();
writer.Initialize(_lo, _lo.ColumnNumber);
writer.WriteObject(goc.Data.groupingEntry.formatValueList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ Describe "Format-Custom with expression based EntrySelectedBy in a CustomControl
$ps.Streams.Error.Clear()
$expectedOutput = @'


Entry selected by property

Name
Expand All @@ -424,7 +423,6 @@ testing
$ps.Streams.Error.Clear()
$expectedOutput = @'


Entry selected by ScriptBlock

Name
Expand Down