From 0918776d0068e7fcf2deab3a006e2f90321ef874 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Fri, 1 Mar 2024 20:36:37 +0900 Subject: [PATCH] Don't use FLUSH when switching modes in rline --- src/vendor/rline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vendor/rline.c b/src/vendor/rline.c index 9d2de42..535c743 100644 --- a/src/vendor/rline.c +++ b/src/vendor/rline.c @@ -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;