mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-02 12:30:24 +08:00
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
55c4162360
commit
c91d8e636b
@ -1425,11 +1425,19 @@ fhandler_pty_slave::tcgetattr (struct termios *t)
|
||||
{
|
||||
reset_switch_to_pcon ();
|
||||
*t = get_ttyp ()->ti;
|
||||
|
||||
/* Workaround for rlwrap */
|
||||
if (get_ttyp ()->pcon_start)
|
||||
t->c_lflag &= ~(ICANON | ECHO);
|
||||
if (get_ttyp ()->h_pseudo_console)
|
||||
t->c_iflag &= ~ICRNL;
|
||||
cygheap_fdenum cfd (false);
|
||||
while (cfd.next () >= 0)
|
||||
if (cfd->get_major () == DEV_PTYM_MAJOR
|
||||
&& 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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user