Disable ONLCR mapping of NL output to CR-NL

Per @nbuwe's excellent explanation in #4505, we can save on output
to the tty by maintaining column location after NL by disabling the
ONLCR terminal mode.

Closes #4505.
This commit is contained in:
Mahmoud Al-Qudsi
2018-10-17 21:20:39 -05:00
parent dfe6bc531e
commit 3f820f0edf
2 changed files with 1 additions and 7 deletions

View File

@@ -924,6 +924,7 @@ void reader_init() {
shell_modes.c_iflag &= ~INLCR; // disable mapping NL (\cJ) to CR (\cM)
shell_modes.c_iflag &= ~IXON; // disable flow control
shell_modes.c_iflag &= ~IXOFF; // disable flow control
shell_modes.c_iflag &= ~ONLCR; // disable mapping of NL to CR-NL on output (#4505)
shell_modes.c_lflag &= ~ICANON; // turn off canonical mode
shell_modes.c_lflag &= ~ECHO; // turn off echo mode