[terminal buffering] Add support for the "mode 2026"

That task is definitely way more complicated that it seemed to be 😅
This commit is contained in:
Olivier Philippon
2022-05-20 12:51:40 +01:00
parent c212fd501f
commit d14659c1a3
10 changed files with 239 additions and 29 deletions

View File

@@ -13,8 +13,10 @@ from rich.console import Console
from textual import events, errors
from textual._clock import _Clock
from textual.app import App, ComposeResult, WINDOWS
from textual.app import WINDOWS
from textual._context import active_app
from textual._terminal_features import TerminalSupportedFeatures
from textual.app import App, ComposeResult
from textual.driver import Driver
from textual.geometry import Size, Region
@@ -45,9 +47,13 @@ class AppTest(App):
# Let's disable all features by default
self.features = frozenset()
# We need this so the `CLEAR_SCREEN_SEQUENCE` is always sent for a screen refresh,
# We need this so the iTerm2 `CLEAR_SCREEN_SEQUENCE` is always sent for a screen refresh,
# whatever the environment:
self._sync_available = True
# (we use it to slice the output into distinct full screens displays)
self._terminal_features = TerminalSupportedFeatures(
iterm2_synchronized_update=True,
mode2026_synchronized_update=False,
)
self._size = size
self._console = ConsoleTest(width=size.width, height=size.height)