diff --git a/src/bin/fish_key_reader.rs b/src/bin/fish_key_reader.rs index 1eb38b939..1b41b8c2f 100644 --- a/src/bin/fish_key_reader.rs +++ b/src/bin/fish_key_reader.rs @@ -19,7 +19,7 @@ use fish::{ env::env_init, eprintf, fprintf, input::input_terminfo_get_name, - input_common::{CharEvent, InputEventQueue, InputEventQueuer}, + input_common::{terminal_protocols_enable_ifn, CharEvent, InputEventQueue, InputEventQueuer}, key::{self, Key}, panic::panic_handler, print_help::print_help, @@ -90,6 +90,7 @@ fn process_input(continuous_mode: bool) -> i32 { let mut recent_chars2 = vec![]; eprintf!("Press a key:\n"); + terminal_protocols_enable_ifn(); while (!first_char_seen || continuous_mode) && !check_exit_loop_maybe_warning(None) { let evt = queue.readch(); diff --git a/src/input_common.rs b/src/input_common.rs index 9da57e4de..01da00110 100644 --- a/src/input_common.rs +++ b/src/input_common.rs @@ -433,7 +433,7 @@ static TERMINAL_PROTOCOLS: MainThread>> = pub(crate) static IS_TMUX: RelaxedAtomicBool = RelaxedAtomicBool::new(false); -pub(crate) fn terminal_protocols_enable_ifn() { +pub fn terminal_protocols_enable_ifn() { let mut term_protocols = TERMINAL_PROTOCOLS.get().borrow_mut(); if term_protocols.is_some() { return;