From bda1d7fd7b64875168243ad95131cb80b602f47e Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Tue, 18 Aug 2020 15:24:26 +0430 Subject: [PATCH] LibLine: Setup the keybindings after initialisation This makes the keybindings that depend on `m_termios` (^W, ^U, etc) work. --- Libraries/LibLine/Editor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Libraries/LibLine/Editor.cpp b/Libraries/LibLine/Editor.cpp index f5d26d15d7b..fb2d27859fe 100644 --- a/Libraries/LibLine/Editor.cpp +++ b/Libraries/LibLine/Editor.cpp @@ -163,11 +163,6 @@ Editor::Editor(Configuration configuration) m_pending_chars = ByteBuffer::create_uninitialized(0); get_terminal_size(); m_suggestion_display = make(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; }