mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 22:01:47 +03:00
ff153ba27f
There were two bugs here: * \u8D (the utf8 encoded representation of 0x8d, aka: RI) was not recognized as a C1 code and was instead passed through as printable text. * The \u8D is a zero-width sequence which means that a subsequent set_cell call on the new empty-by-default line wouldn't allocate any cells in the line array, and the assigment to the line would panic. This commit avoids the panic for the second case, and then fixes up the vtparser to correctly recognize the sequence as a C1 control. refs: https://github.com/wez/wezterm/issues/768 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
vtparse
This is an implementation of a parser for escape and control sequences. It is based on the DEC ANSI Parser.
It has been modified slightly to support UTF-8 sequences.
vtparse
is the lowest level parser; it categorizes the basic
types of sequences but does not ascribe any semantic meaning
to them.
You may wish to look at termwiz::escape::parser::Parser
in the
termwiz crate if you're looking for semantic
parsing.
Comparison with the vte
crate
vtparse
has support for dynamically sized OSC buffers, which makes
it suitable for processing large escape sequences, such as those
used by the iTerm2
image protocol.