Cygwin: pty: Revise the workaround for rlwrap.
- Previous workaround has a problem that screen is distorted if up arrow key is pressed at the first line after running "rlwrap cmd". This patch fixes the issue.
This commit is contained in:
parent
da8cebcded
commit
4e16b0330a
|
@ -1111,8 +1111,8 @@ fhandler_pty_slave::tcgetattr (struct termios *t)
|
|||
*t = get_ttyp ()->ti;
|
||||
/* Workaround for rlwrap */
|
||||
if (get_ttyp ()->pcon_start)
|
||||
t->c_lflag &= ~ICANON;
|
||||
else if (get_ttyp ()->h_pseudo_console)
|
||||
t->c_lflag &= ~(ICANON | ECHO);
|
||||
if (get_ttyp ()->h_pseudo_console)
|
||||
t->c_iflag &= ~ICRNL;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue