From ccca5b553f1247e176d465ccf32c803c847e9396 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Sun, 25 Sep 2022 13:23:09 +0200 Subject: [PATCH] Disable VQUIT for shell modes This allows binding ctrl+\ by default. Fixes #9234 --- src/fish_key_reader.cpp | 2 +- src/reader.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fish_key_reader.cpp b/src/fish_key_reader.cpp index e3ec92f59..94c162d84 100644 --- a/src/fish_key_reader.cpp +++ b/src/fish_key_reader.cpp @@ -39,7 +39,7 @@ static const wchar_t *ctrl_symbolic_names[] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, L"\\a", L"\\b", L"\\t", L"\\n", L"\\v", L"\\f", L"\\r", nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, - nullptr, nullptr, nullptr, L"\\e", nullptr, nullptr, nullptr, nullptr}; + nullptr, nullptr, nullptr, L"\\e", L"\\x1c", nullptr, nullptr, nullptr}; /// Return true if the recent sequence of characters indicates the user wants to exit the program. static bool should_exit(wchar_t wc) { diff --git a/src/reader.cpp b/src/reader.cpp index 7c1f1d831..7cdfb5603 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -955,6 +955,7 @@ static void term_fix_modes(struct termios *modes) { // We ignore these anyway, so there is no need to sacrifice a character. modes->c_cc[VSUSP] = disabling_char; + modes->c_cc[VQUIT] = disabling_char; } static void term_fix_external_modes(struct termios *modes) {