mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge pull request #1664 from Textualize/lonely-p
don't request sync on macOS app
This commit is contained in:
@@ -145,9 +145,14 @@ class LinuxDriver(Driver):
|
||||
self._request_terminal_sync_mode_support()
|
||||
self._enable_bracketed_paste()
|
||||
|
||||
def _request_terminal_sync_mode_support(self):
|
||||
self.console.file.write("\033[?2026$p")
|
||||
self.console.file.flush()
|
||||
def _request_terminal_sync_mode_support(self) -> None:
|
||||
"""Writes an escape sequence to query the terminal support for the sync protocol."""
|
||||
# Terminals should ignore this sequence if not supported.
|
||||
# Apple terminal doesn't, and writes a single 'p' in to the terminal,
|
||||
# so we will make a special case for Apple terminal (which doesn't support sync anyway).
|
||||
if self.console._environ.get("TERM_PROGRAM", "") != "Apple_Terminal":
|
||||
self.console.file.write("\033[?2026$p")
|
||||
self.console.file.flush()
|
||||
|
||||
@classmethod
|
||||
def _patch_lflag(cls, attrs: int) -> int:
|
||||
|
||||
Reference in New Issue
Block a user