]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: pty: Revise the workaround for rlwrap.
authorTakashi Yano via Cygwin-patches <cygwin-patches@cygwin.com>
Wed, 16 Dec 2020 09:10:58 +0000 (18:10 +0900)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 16 Dec 2020 09:31:09 +0000 (10:31 +0100)
- 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.

winsup/cygwin/fhandler_tty.cc

index 77d9d9b471dad63bf0120732fb56519cbc017fcb..77f7bfe4322fbb93426b5ed37b31ba6ce37ffe6b 100644 (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;
 }
This page took 0.033732 seconds and 5 git commands to generate.