Cygwin: pty: Lessen the side effect of workaround for rlwarp.
- This patch lessens the side effect of the workaround for rlwrap
introduced by commit 4e16b033
.
This commit is contained in:
parent
59ccb3a008
commit
62e739b51b
|
@ -1176,11 +1176,19 @@ fhandler_pty_slave::tcgetattr (struct termios *t)
|
||||||
{
|
{
|
||||||
reset_switch_to_pcon ();
|
reset_switch_to_pcon ();
|
||||||
*t = get_ttyp ()->ti;
|
*t = get_ttyp ()->ti;
|
||||||
|
|
||||||
/* Workaround for rlwrap */
|
/* Workaround for rlwrap */
|
||||||
if (get_ttyp ()->pcon_start)
|
cygheap_fdenum cfd (false);
|
||||||
t->c_lflag &= ~(ICANON | ECHO);
|
while (cfd.next () >= 0)
|
||||||
if (get_ttyp ()->h_pseudo_console)
|
if (cfd->get_major () == DEV_PTYM_MAJOR
|
||||||
t->c_iflag &= ~ICRNL;
|
&& cfd->get_minor () == get_minor ())
|
||||||
|
{
|
||||||
|
if (get_ttyp ()->pcon_start)
|
||||||
|
t->c_lflag &= ~(ICANON | ECHO);
|
||||||
|
if (get_ttyp ()->h_pseudo_console)
|
||||||
|
t->c_iflag &= ~ICRNL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue