File tree Expand file tree Collapse file tree
Microsoft.PowerShell.ConsoleHost/host/msh
System.Management.Automation/engine Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,12 +97,6 @@ class ConsoleHostUserInterface : System.Management.Automation.Host.PSHostUserInt
9797 // Update the progress pane only when the timer set up the update flag or WriteProgress is completed.
9898 // As a result, we do not block WriteProgress and whole script and eliminate unnecessary console locks and updates.
9999 _progPane . Show ( _pendingProgress ) ;
100-
101- // Reset the cursor back to where it started
102- if ( record . RecordType == ProgressRecordType . Completed )
103- {
104- _progPane . Hide ( ) ;
105- }
106100 }
107101 }
108102
Original file line number Diff line number Diff line change @@ -99,20 +99,12 @@ class ProgressPane
9999
100100 //if the cursor is at the bottom, create screen buffer space by scrolling
101101 int scrollRows = rows - ( ( _rawui . BufferSize . Height - 1 ) - _location . Y ) ;
102+ for ( int i = 0 ; i < rows ; i ++ )
103+ {
104+ Console . Out . Write ( '\n ' ) ;
105+ }
102106 if ( scrollRows > 0 )
103107 {
104- // The following can be possibly replaced by Console.Write ("\x1b[" + scrollRows + "S");
105- // For details, see https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
106-
107- // Scroll the console screen up by 'scrollRows'
108- var bottomLocation = _location ;
109- bottomLocation . Y = _rawui . BufferSize . Height ;
110- _rawui . CursorPosition = bottomLocation ;
111- for ( int i = 0 ; i < scrollRows ; i ++ )
112- {
113- Console . Out . Write ( '\n ' ) ;
114- }
115-
116108 _location . Y -= scrollRows ;
117109 _savedCursor . Y -= scrollRows ;
118110 }
Original file line number Diff line number Diff line change @@ -2252,7 +2252,7 @@ internal void ThrowIfWriteNotPermitted(bool needsToWriteToPipeline)
22522252 {
22532253 // Only generate these exceptions if a pipeline has already been declared as the 'writing' pipeline.
22542254 // Otherwise, these are probably infrastructure messages and can be ignored.
2255- if ( this . PipelineProcessor ? . _permittedToWrite != null )
2255+ if ( this . PipelineProcessor . _permittedToWrite != null )
22562256 {
22572257 throw PSTraceSource . NewInvalidOperationException (
22582258 PipelineStrings . WriteNotPermitted ) ;
You can’t perform that action at this time.
0 commit comments