Skip to content

Commit

Permalink
comment and docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Jan 25, 2023
1 parent 15af0cd commit a292086
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/textual/drivers/linux_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ def on_terminal_resize(signum, stack) -> None:
self._request_terminal_sync_mode_support()
self._enable_bracketed_paste()

def _request_terminal_sync_mode_support(self):
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()
Expand Down

0 comments on commit a292086

Please sign in to comment.