Restore the console to the default state
(self)
| 365 | self.__enable_bracketed_paste() |
| 366 | |
| 367 | def restore(self): |
| 368 | """ |
| 369 | Restore the console to the default state |
| 370 | """ |
| 371 | self.__disable_bracketed_paste() |
| 372 | self.__maybe_write_code(self._rmkx) |
| 373 | self.flushoutput() |
| 374 | tcsetattr(self.input_fd, termios.TCSADRAIN, self.__svtermstate) |
| 375 | |
| 376 | if platform.system() == "Darwin" and os.getenv("TERM_PROGRAM") == "Apple_Terminal": |
| 377 | os.write(self.output_fd, b"\033[?7h") |
| 378 | |
| 379 | if hasattr(self, "old_sigwinch"): |
| 380 | signal.signal(signal.SIGWINCH, self.old_sigwinch) |
| 381 | del self.old_sigwinch |
| 382 | |
| 383 | def push_char(self, char: int | bytes) -> None: |
| 384 | """ |
nothing calls this directly
no test coverage detected