Disable SUSP

Frees up C-z and suspending an IRC client is silly anyway.
weechat-hashes
C. McEnroe 2020-02-06 02:25:58 -05:00
parent 8b3bf897c2
commit a5a162b9c6
1 changed files with 1 additions and 0 deletions

1
ui.c
View File

@ -176,6 +176,7 @@ static void disableFlowControl(void) {
int error = tcgetattr(STDOUT_FILENO, &term); int error = tcgetattr(STDOUT_FILENO, &term);
if (error) err(EX_OSERR, "tcgetattr"); if (error) err(EX_OSERR, "tcgetattr");
term.c_iflag &= ~IXON; term.c_iflag &= ~IXON;
term.c_cc[VSUSP] = _POSIX_VDISABLE;
term.c_cc[VDISCARD] = _POSIX_VDISABLE; term.c_cc[VDISCARD] = _POSIX_VDISABLE;
error = tcsetattr(STDOUT_FILENO, TCSADRAIN, &term); error = tcsetattr(STDOUT_FILENO, TCSADRAIN, &term);
if (error) err(EX_OSERR, "tcsetattr"); if (error) err(EX_OSERR, "tcsetattr");