mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 22:44:50 +02:00
Only reset termios when user triggers reset action rather than in reponse to reset escape code
Fixes #9126
This commit is contained in:
@@ -563,9 +563,9 @@ class Child:
|
||||
os.killpg(pgrp, s)
|
||||
return True
|
||||
|
||||
def reset_termios_state(self) -> None:
|
||||
def reset_termios_state(self, when: int = termios.TCSANOW) -> None:
|
||||
if (s := getattr(self, 'initial_termios_state', None)) and self.child_fd is not None:
|
||||
try:
|
||||
termios.tcsetattr(self.child_fd, termios.TCSANOW, s)
|
||||
termios.tcsetattr(self.child_fd, when, s)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user