mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user