End DCS/OSC strings at any ESC, default the external terminal to Terminal.app

A string with no ST swallowed every later sequence, RIS included, and
Clear Screen could not recover the tab. Any ESC now ends it, as in xterm,
and the sequence it starts is dispatched. The shipped setting needed Kitty.

Also: REP, SCOSC/SCORC, DECOM-relative CPR, `:` subparams and more DECRQM
modes answered; new rows inserted in one edit; controls stripped from
pastes; wide-char mouse columns.
This commit is contained in:
Vaclav Tvrdik
2026-11-01 20:22:56 +01:00
parent 93253aa564
commit 2abbc503cf
9 changed files with 264 additions and 55 deletions

View File

@@ -296,11 +296,12 @@ def drive(feed, need_to_render, render, data, tick):
def run_vterm(data, tick):
from vterm.emulator import VtScreen, VtStream
from vterm.render import VtermRenderCommand
from vterm.scheme import get_scheme_manager
from vterm.terminal import Terminal
counter = collections.Counter()
view = CountingView(counter)
terminal = Terminal(view)
terminal = Terminal(view, get_scheme_manager("default"))
terminal.scrollback_size = SCROLLBACK
terminal.process = FakeProcess()
terminal.screen = VtScreen(COLUMNS, ROWS, process=terminal.process, history=SCROLLBACK)