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
Notes: sideshowbarker 2024-07-19 03:27:27 +09:00

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;
}