We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e8265a commit 86c3219Copy full SHA for 86c3219
examples/console.cpp
@@ -80,8 +80,10 @@ namespace console {
80
// Set console input codepage to UTF16
81
_setmode(_fileno(stdin), _O_WTEXT);
82
83
- if (!simple_io) {
84
- // Turn off ICANON (ENABLE_LINE_INPUT) and ECHO (ENABLE_ECHO_INPUT)
+ // Set ICANON (ENABLE_LINE_INPUT) and ECHO (ENABLE_ECHO_INPUT)
+ if (simple_io) {
85
+ dwMode |= ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT;
86
+ } else {
87
dwMode &= ~(ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT);
88
}
89
if (!SetConsoleMode(hConIn, dwMode)) {
0 commit comments