Skip to content

Commit

Permalink
Fix cut and paste error that broke Ctrl-C
Browse files Browse the repository at this point in the history
  • Loading branch information
lzybkr committed Sep 12, 2013
1 parent 3e23733 commit 74bf363
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PSReadLine/ReadLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,17 @@ public static string ReadLine()
{
uint dwConsoleMode;
var handle = NativeMethods.GetStdHandle((uint) StandardHandleId.Input);
NativeMethods.GetConsoleMode(handle, out dwConsoleMode);
try
{
NativeMethods.GetConsoleMode(handle, out dwConsoleMode);
NativeMethods.SetConsoleMode(handle, dwConsoleMode & ~NativeMethods.ENABLE_PROCESSED_INPUT);

_singleton.Initialize();
return _singleton.InputLoop();
}
finally
{
NativeMethods.GetConsoleMode(handle, out dwConsoleMode);
NativeMethods.SetConsoleMode(handle, dwConsoleMode);
}
}

Expand Down

0 comments on commit 74bf363

Please sign in to comment.