lrstanley / bubblezone

helper utility for BubbleTea, allowing easy mouse event tracking
https://pkg.go.dev/github.com/lrstanley/bubblezone
MIT License
521 stars 15 forks source link

use private CSI sequence for marking #20

Closed srlehn closed 3 months ago

srlehn commented 10 months ago

πŸš€ Changes proposed by this PR

πŸ”— Related bug reports/feature requests

ISSUE: The ANSI CSI sequence used for marking should be a private one #19

🧰 Type of change

Use private CSI sequence instead of the already defined CBT CSI sequence.

Fixes #19

πŸ“ Notes to reviewer

https://en.wikipedia.org/wiki/ANSI_escape_code#CSI_(Control_Sequence_Introducer)_sequences

"A subset of arrangements was declared "private" so that terminal manufacturers could insert their own sequences without conflicting with the standard. Sequences containing the parameter bytes <=>? or the final bytes 0x70–0x7E (p–z{|}~) are private. "


https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf

5.4.d) F is the Final Byte; it consists of a bit combination from 04/00 to 07/14; it terminates the control sequence and together with the Intermediate Bytes, if present, identifies the control function.

Bit combinations 07/00 to 07/14 are available as Final Bytes of control sequences for private (or experimental) use.

5.4 Table 3: ("Z" = column 05, row 10 -> "CBT")


https://vt100.net/docs/vt510-rm/chapter4.html (search for "CBT)

🀝 Requirements

lrstanley commented 3 months ago

Sorry for the delay -- I will add that the escape sequence shouldn't matter in this case, because it never actually makes it out to the terminal, but I do think this is still a good idea.