LibLine: Keep the CSI bytes alive across read events

Otherwise we would lose the CSI parameters and intermediates if the
whole sequence was split between two reads.
Fixes #7835.
This commit is contained in:
Ali Mohammad Pur 2021-06-06 23:24:07 +04:30 committed by Ali Mohammad Pur
parent d8c5eeceab
commit f82aa87d14
Notes: sideshowbarker 2024-07-18 12:44:01 +09:00

View File

@ -815,9 +815,9 @@ void Editor::handle_read_event()
Utf8View input_view { StringView { m_incomplete_data.data(), valid_bytes } };
size_t consumed_code_points = 0;
Vector<u8, 4> csi_parameter_bytes;
static Vector<u8, 4> csi_parameter_bytes;
static Vector<u8> csi_intermediate_bytes;
Vector<unsigned, 4> csi_parameters;
Vector<u8> csi_intermediate_bytes;
u8 csi_final;
enum CSIMod {
Shift = 1,