Restore the console to the default state
(self)
| 379 | self.__enable_bracketed_paste() |
| 380 | |
| 381 | def restore(self): |
| 382 | """ |
| 383 | Restore the console to the default state |
| 384 | """ |
| 385 | self.__disable_bracketed_paste() |
| 386 | self.__maybe_write_code(self._rmkx) |
| 387 | self.flushoutput() |
| 388 | self.__input_fd_set(self.__svtermstate) |
| 389 | |
| 390 | if self.is_apple_terminal: |
| 391 | os.write(self.output_fd, b"\033[?7h") |
| 392 | |
| 393 | if hasattr(self, "old_sigwinch"): |
| 394 | try: |
| 395 | signal.signal(signal.SIGWINCH, self.old_sigwinch) |
| 396 | except ValueError as e: |
| 397 | import threading |
| 398 | if threading.current_thread() is threading.main_thread(): |
| 399 | raise e |
| 400 | del self.old_sigwinch |
| 401 | |
| 402 | def push_char(self, char: int | bytes) -> None: |
| 403 | """ |