Skip to content
Permalink
Browse files

password: do not use line input on windows

This keeps its builtin command editing away

Thanks iDunk for testing on Windows
  • Loading branch information...
moneromooo-monero committed May 8, 2019
1 parent c0bc6d9 commit e1016bce1414e213a83f119d4db98f579f78d104
Showing with 1 addition and 5 deletions.
  1. +1 −5 src/common/password.cpp
@@ -57,7 +57,7 @@ namespace

DWORD mode_old;
::GetConsoleMode(h_cin, &mode_old);
DWORD mode_new = mode_old & ~(hide_input ? ENABLE_ECHO_INPUT : 0);
DWORD mode_new = mode_old & ~((hide_input ? ENABLE_ECHO_INPUT : 0) | ENABLE_LINE_INPUT);
::SetConsoleMode(h_cin, mode_new);

bool r = true;
@@ -76,10 +76,6 @@ namespace
break;
}
else if (ucs2_ch == L'\r')
{
continue;
}
else if (ucs2_ch == L'\n')
{
std::cout << std::endl;
break;

0 comments on commit e1016bc

Please sign in to comment.
You can’t perform that action at this time.