Created
June 20, 2016 12:56
-
-
Save ichizok/acae1b5431a639108dd8cf2768823dc2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/os_unix.c b/src/os_unix.c | |
--- a/src/os_unix.c | |
+++ b/src/os_unix.c | |
@@ -3411,7 +3411,11 @@ mch_settmode(int tmode) | |
tnew.c_cc[VTIME] = 0; /* don't wait */ | |
} | |
else if (tmode == TMODE_SLEEP) | |
- tnew.c_lflag &= ~(ECHO); | |
+ { | |
+ tnew.c_lflag &= ~(ICANON | ECHO); | |
+ tnew.c_cc[VMIN] = 1; /* return after 1 char */ | |
+ tnew.c_cc[VTIME] = 0; /* don't wait */ | |
+ } | |
# if defined(HAVE_TERMIOS_H) | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment