diff --git a/src/main/java/org/jline/terminal/impl/jna/linux/LinuxNativePty.java b/src/main/java/org/jline/terminal/impl/jna/linux/LinuxNativePty.java index 63929ca2a..10915ae5f 100644 --- a/src/main/java/org/jline/terminal/impl/jna/linux/LinuxNativePty.java +++ b/src/main/java/org/jline/terminal/impl/jna/linux/LinuxNativePty.java @@ -68,7 +68,12 @@ public Attributes getAttr() throws IOException { @Override public void setAttr(Attributes attr) throws IOException { termios termios = new termios(attr); - C_LIBRARY.tcsetattr(getSlave(), TCSADRAIN, termios); + termios org = new termios(); + C_LIBRARY.tcgetattr(getSlave(), org); + org.c_iflag = termios.c_iflag; + org.c_oflag = termios.c_oflag; + org.c_lflag = termios.c_lflag; + C_LIBRARY.tcsetattr(getSlave(), TCSADRAIN, org); } @Override