From 3c2d6f623fbfcce1d5da50be981086d97405d2b3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 12 Feb 2025 09:51:52 +0530 Subject: [PATCH] Add max text length per escape code to the text-sizing-protocol --- docs/text-sizing-protocol.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/text-sizing-protocol.rst b/docs/text-sizing-protocol.rst index 906e8aa99..49c7c635f 100644 --- a/docs/text-sizing-protocol.rst +++ b/docs/text-sizing-protocol.rst @@ -57,9 +57,11 @@ at the specified size. It is an ``OSC`` code of the form:: Here, ``OSC`` is the bytes ``ESC ] (0x1b 0x5b)``. The ``metadata`` is a colon separated list of ``key=value`` pairs. The final part of the escape code is the -text which is simply plain text encoded as :ref:`safe_utf8`. Spaces in this -definition are for clarity only and should be ignored. The ``terminator`` is -either the byte ``BEL (0x7)`` or the bytes ``ESC ST (0x1b 0x5c)``. +text which is simply plain text encoded as :ref:`safe_utf8`, the text must be +no longer than ``4096`` bytes. Longer strings than that must be broken up into +multiple escape codes. Spaces in this definition are for clarity only and +should be ignored. The ``terminator`` is either the byte ``BEL (0x7)`` or the +bytes ``ESC ST (0x1b 0x5c)``. There are only a handful of metadata keys, defined in the table below: