diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-06-06 23:24:07 +0430 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-06-06 23:55:20 +0430 |
commit | f82aa87d141a27271a3494fb734b5a9fc3ee4930 (patch) | |
tree | bbb2bacb6c8fb51ed6d3bfea899d447d11181896 /Userland/Libraries/LibLine/Editor.cpp | |
parent | d8c5eeceabbeaedc29823f12cc8a9cfac6f84686 (diff) | |
download | serenity-f82aa87d141a27271a3494fb734b5a9fc3ee4930.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibLine/Editor.cpp')
-rw-r--r-- | Userland/Libraries/LibLine/Editor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibLine/Editor.cpp b/Userland/Libraries/LibLine/Editor.cpp index 43324b0197..82171a7d02 100644 --- a/Userland/Libraries/LibLine/Editor.cpp +++ b/Userland/Libraries/LibLine/Editor.cpp @@ -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, |