From 606f08e401495ac71c1431ee015eed1839f6da19 Mon Sep 17 00:00:00 2001 From: Niklas Poslovski Date: Sat, 15 Jun 2024 20:01:15 +0200 Subject: [PATCH 4/9] LibLine: Don't use VWERASE on Haiku as it doesn't exist here --- Userland/Libraries/LibLine/Editor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibLine/Editor.cpp b/Userland/Libraries/LibLine/Editor.cpp index fb2d553b8d..5535b0755c 100644 --- a/Userland/Libraries/LibLine/Editor.cpp +++ b/Userland/Libraries/LibLine/Editor.cpp @@ -180,9 +180,11 @@ void Editor::set_default_keybinds() register_key_input_callback(Key { 'u', Key::Alt }, EDITOR_INTERNAL_FUNCTION(uppercase_word)); register_key_input_callback(Key { 't', Key::Alt }, EDITOR_INTERNAL_FUNCTION(transpose_words)); +#if !defined(AK_OS_HAIKU) // Register these last to all the user to override the previous key bindings // Normally ^W. `stty werase \^n` can change it to ^N (or something else). register_key_input_callback(m_termios.c_cc[VWERASE], EDITOR_INTERNAL_FUNCTION(erase_word_backwards)); +#endif // Normally ^U. `stty kill \^n` can change it to ^N (or something else). register_key_input_callback(m_termios.c_cc[VKILL], EDITOR_INTERNAL_FUNCTION(kill_line)); register_key_input_callback(m_termios.c_cc[VERASE], EDITOR_INTERNAL_FUNCTION(erase_character_backwards)); -- 2.43.2