LibVT: Make the Xterm/OSC sequence parsing a bit more robust

Tolerate sequences ending in both <0x07> (BEL) and <0x1b> <0x5c> (ST).
The former is apparently an Xterm extension and the latter is standard.
This commit is contained in:
Andreas Kling 2020-05-09 12:08:41 +02:00
commit a0616d96bf
Notes: sideshowbarker 2024-07-19 06:49:06 +09:00
2 changed files with 52 additions and 37 deletions

View file

@ -211,15 +211,14 @@ private:
ExpectIntermediate,
ExpectFinal,
ExpectHashtagDigit,
ExpectXtermParameter1,
ExpectXtermParameter2,
ExpectXtermFinal,
ExpectXtermParameter,
ExpectStringTerminator,
};
EscapeState m_escape_state { Normal };
Vector<u8> m_parameters;
Vector<u8> m_intermediates;
Vector<u8> m_xterm_param1;
Vector<u8> m_xterm_param2;
Vector<u8> m_xterm_parameters;
Vector<bool> m_horizontal_tabs;
u8 m_final { 0 };