Skip to content

Commit

Permalink
Don't use FLUSH when switching modes in rline
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed Mar 1, 2024
1 parent 47500c8 commit 0918776
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vendor/rline.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0918776

Please sign in to comment.