From 4b9fece9f48615f2e8068054c60763e844415a7c Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Thu, 14 Jan 2016 21:46:53 -0800 Subject: allow configuring the escape delay timeout Introduce a "fish_escape_delay_ms" variable to allow the user to configure the delay used when seeing a bare escape before assuming no other characters will be received that might match a bound character sequence. This is primarily useful for vi mode so that a bare escape character (i.e., keystroke) can switch to vi "insert" to "normal" mode in a timely fashion. --- src/env.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/env.cpp') diff --git a/src/env.cpp b/src/env.cpp index 3d7023db..527ed253 100644 --- a/src/env.cpp +++ b/src/env.cpp @@ -303,7 +303,7 @@ static void handle_locale() } -/** React to modifying hte given variable */ +/** React to modifying the given variable */ static void react_to_variable_change(const wcstring &key) { if (var_is_locale(key)) @@ -319,6 +319,10 @@ static void react_to_variable_change(const wcstring &key) { reader_react_to_color_change(); } + else if (key == L"fish_escape_delay_ms") + { + update_wait_on_escape_ms(); + } } /** -- cgit v1.2.3