Don't use FLUSH when switching modes in rline

This commit is contained in:
K. Lange 2024-03-01 20:36:37 +09:00
parent 47500c833f
commit 0918776d00

4
src/vendor/rline.c vendored
View File

@ -2022,12 +2022,12 @@ static void set_unbuffered(void) {
_EOF = old.c_cc[VEOF];
struct termios new = old;
new.c_lflag &= (~ICANON & ~ECHO & ~ISIG);
tcsetattr(STDOUT_FILENO, TCSAFLUSH, &new);
tcsetattr(STDOUT_FILENO, TCSADRAIN, &new);
if (wcwidth(0x3042) != 2) setlocale(LC_CTYPE, "");
}
static void set_buffered(void) {
tcsetattr(STDOUT_FILENO, TCSAFLUSH, &old);
tcsetattr(STDOUT_FILENO, TCSADRAIN, &old);
}
#else
static unsigned int _INTR = 3;