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:
Takashi Yano via Cygwin-patches 2020-12-16 18:10:58 +09:00 committed by Corinna Vinschen
parent da8cebcded
commit 4e16b0330a
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}