File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,10 @@ task LayoutModule BuildMainModule, {
130130 $binPath = " PSReadLine/bin/$Configuration /$Framework /publish"
131131 Copy-Item $binPath / Microsoft.PowerShell.PSReadLine2.dll $targetDir
132132
133+ if ($Configuration -eq ' Debug' ) {
134+ Copy-Item $binPath /* .pdb $targetDir
135+ }
136+
133137 if (Test-Path $binPath / System.Runtime.InteropServices.RuntimeInformation.dll)
134138 {
135139 Copy-Item $binPath / System.Runtime.InteropServices.RuntimeInformation.dll $targetDir
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ public partial class PSConsoleReadLine : IPSConsoleReadLineMockableMethods
4444
4545 private static readonly CancellationToken _defaultCancellationToken = new CancellationTokenSource ( ) . Token ;
4646
47+ private static Action _handleIdleOverride ;
48+
4749 private bool _delayedOneTimeInitCompleted ;
4850
4951 private IPSConsoleReadLineMockableMethods _mockableMethods ;
@@ -201,6 +203,12 @@ internal static PSKeyInfo ReadKey()
201203 if ( handleId != WaitHandle . WaitTimeout && handleId != EventProcessingRequested )
202204 break ;
203205
206+ if ( _handleIdleOverride != null )
207+ {
208+ _handleIdleOverride ( ) ;
209+ continue ;
210+ }
211+
204212 // If we timed out, check for event subscribers (which is just
205213 // a hint that there might be an event waiting to be processed.)
206214 var eventSubscribers = _singleton . _engineIntrinsics ? . Events . Subscribers ;
You can’t perform that action at this time.
0 commit comments