From fcaf9d7e52e57f02fbfed7cd7f0a3576f24c4644 Mon Sep 17 00:00:00 2001 From: gurrium Date: Mon, 12 Dec 2022 22:41:21 +0900 Subject: [PATCH] next: https://viewsourcecode.org/snaptoken/kilo/02.enteringRawMode.html#turn-off-all-output-processing#a-timeout-for-read --- kilo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kilo.c b/kilo.c index 8569cbc..947decd 100644 --- a/kilo.c +++ b/kilo.c @@ -15,8 +15,9 @@ void enableRawMode() { atexit(disableRawMode); struct termios raw = orig_termios; - raw.c_iflag &= ~(ICRNL | IXON); + raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON); raw.c_oflag &= ~(OPOST); + raw.c_cflag |= ~(CS8); raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);