1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:47:35 +00:00

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
parent 283bd1a95c
commit a0616d96bf
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 };