]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: pty: Add workaround for rlwrap 0.40 or later.
authorTakashi Yano via Cygwin-patches <cygwin-patches@cygwin.com>
Fri, 15 Jan 2021 08:32:09 +0000 (17:32 +0900)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 18 Jan 2021 10:02:46 +0000 (11:02 +0100)
- The workaround for rlwrap introduced by commit 8199b0cc does not
  take effect for rlwrap 0.40 or later. This patch add a workaround
  for rlwrap 0.40 or later as well.

winsup/cygwin/fhandler_tty.cc

index 77f7bfe4322fbb93426b5ed37b31ba6ce37ffe6b..8ff74cddee26e144ffda7cf49805c0e1e83a30fc 100644 (file)
@@ -1720,6 +1720,11 @@ int
 fhandler_pty_master::tcgetattr (struct termios *t)
 {
   *t = cygwin_shared->tty[get_minor ()]->ti;
+  /* Workaround for rlwrap v0.40 or later */
+  if (get_ttyp ()->pcon_start)
+    t->c_lflag &= ~(ICANON | ECHO);
+  if (get_ttyp ()->h_pseudo_console)
+    t->c_iflag &= ~ICRNL;
   return 0;
 }
 
This page took 0.036374 seconds and 5 git commands to generate.