mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-25 10:27:24 +00:00
...
This commit is contained in:
parent
ee9a5386b9
commit
dd7caaa91b
2 changed files with 3 additions and 3 deletions
|
|
@ -564,8 +564,8 @@ class Child:
|
|||
return True
|
||||
|
||||
def reset_termios_state(self) -> None:
|
||||
if s := getattr(self, 'initial_termios_state', None):
|
||||
if (s := getattr(self, 'initial_termios_state', None)) and self.child_fd is not None:
|
||||
try:
|
||||
termios.tcsetattr(s, termios.TCSANOW)
|
||||
termios.tcsetattr(self.child_fd, termios.TCSANOW, s)
|
||||
except OSError:
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ class PTY:
|
|||
|
||||
def reset_termios_state(self):
|
||||
if s := getattr(self, 'initial_termios_state', None):
|
||||
termios.tcsetattr(self.master_fd, s)
|
||||
termios.tcsetattr(self.master_fd, termios.TCSANOW, s)
|
||||
|
||||
def turn_off_echo(self):
|
||||
s = termios.tcgetattr(self.master_fd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue