Skip to content

Commit

Permalink
LibLine: Keep the CSI bytes alive across read events
Browse files Browse the repository at this point in the history
Otherwise we would lose the CSI parameters and intermediates if the
whole sequence was split between two reads.
Fixes SerenityOS#7835.
  • Loading branch information
alimpfard committed Jun 6, 2021
1 parent d8c5eec commit f82aa87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Userland/Libraries/LibLine/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f82aa87

Please sign in to comment.