1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

LibLine: Setup the keybindings after initialisation

This makes the keybindings that depend on `m_termios` (^W, ^U, etc) work.
This commit is contained in:
AnotherTest 2020-08-18 15:24:26 +04:30 committed by Andreas Kling
parent a698a58d3c
commit bda1d7fd7b

View file

@ -163,11 +163,6 @@ Editor::Editor(Configuration configuration)
m_pending_chars = ByteBuffer::create_uninitialized(0);
get_terminal_size();
m_suggestion_display = make<XtermSuggestionDisplay>(m_num_lines, m_num_columns);
set_default_keybinds();
for (auto& keybind : m_configuration.keybindings)
register_key_input_callback(keybind);
}
Editor::~Editor()
@ -404,6 +399,11 @@ void Editor::initialize()
}
m_termios = termios;
set_default_keybinds();
for (auto& keybind : m_configuration.keybindings)
register_key_input_callback(keybind);
m_initialized = true;
}