summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framebuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/framebuffer.c b/framebuffer.c
index 7199052..36969e0 100644
--- a/framebuffer.c
+++ b/framebuffer.c
@@ -67,8 +67,8 @@ void term_init(void) {
new.c_lflag &= ~ICANON; /* Turn off canonical mode */
new.c_lflag &= ~ECHO; /* Turn off echoing */
- new.c_cc[VMIN] = 1; /* One char at a time */
- new.c_cc[VTIME] = 0; /* No input timeout */
+ new.c_cc[VMIN] = 0; /* Return read(STDIN_FILENO, ...) even if no input */
+ new.c_cc[VTIME] = 0; /* ^, make it return immediately, without waiting */
tcsetattr(0, TCSANOW, &new);
write(STDOUT_FILENO, "\x1b[?1049h", 8); /* Alternative screen buffer */