diff --git a/NEWS b/NEWS index 5b3377db..9e7937a1 100644 --- a/NEWS +++ b/NEWS @@ -30,7 +30,7 @@ To be released as 0.11.4. * fix active and passive FTP over IPv6 * bug 978: Python's webbrowser.open_new_tab(URL) works since now * minor bug 54, Debian bug 338402: don't force the terminal to 8 bits - with no parity + with no parity, and don't disable XON/OFF flow control either * minor bug 951 in user SMJS: garbage-collect SMJS objects on 'File -> Flush all caches' to work around their holding cache entries busy * minor bug 396: never show empty filename in the what-to-do dialog diff --git a/src/osdep/osdep.c b/src/osdep/osdep.c index 55570262..bf5ec188 100644 --- a/src/osdep/osdep.c +++ b/src/osdep/osdep.c @@ -745,12 +745,21 @@ unblock_stdin(void) void elinks_cfmakeraw(struct termios *t) { - /* Bug 54: Do not alter the character-size and parity bits in - * t->c_cflag. If they have unusual values, the terminal - * probably requires those and won't work if ELinks changes - * the flags. The cfmakeraw function would set 8-bit characters - * and no parity, so don't use that. */ - t->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); + /* This elinks_cfmakeraw() intentionally leaves the following + * settings unchanged, even though the standard cfmakeraw() + * would change some of them: + * + * - c_cflag & CSIZE: number of bits per character. + * Bug 54 asked ELinks not to change this. + * - c_cflag & (PARENB | PARODD): parity bit in characters. + * Bug 54 asked ELinks not to change this. + * - c_iflag & (IXON | IXOFF | IXANY): XON/XOFF flow control. + * + * The reasoning is, if the user has set up unusual values for + * those settings before starting ELinks, then the terminal + * probably expects those values and ELinks should not mess + * with them. */ + t->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL); t->c_oflag &= ~OPOST; t->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); t->c_cc[VMIN] = 1;