Also undo changes to ICRNL and INLCR

These control the disambiguation between ctrl-j and ctrl-m.

This can cause the enter key to send a ctrl-m, which programs might be
unprepared for.

(This is why you need to do `stty sane<ctrl-j>`)
This commit is contained in:
Fabian Homborg 2020-06-20 23:40:37 +02:00
parent 30eb4d8b0d
commit 7447c8faae

View file

@ -693,6 +693,8 @@ static void term_steal() {
tty_modes_for_external_cmds.c_lflag |= ICANON;
tty_modes_for_external_cmds.c_lflag |= IEXTEN;
tty_modes_for_external_cmds.c_lflag |= ECHO;
tty_modes_for_external_cmds.c_iflag |= ICRNL;
tty_modes_for_external_cmds.c_iflag |= INLCR;
while (true) {