fish_key_reader: enable terminal protocols again

Fixes 29f2da8d1 (Toggle terminal protocols lazily, 2024-05-16).
This commit is contained in:
Johannes Altmanninger 2024-06-25 19:54:38 +02:00
parent 2d9f8547e2
commit 90150e1729
2 changed files with 3 additions and 2 deletions

View file

@ -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();

View file

@ -433,7 +433,7 @@ static TERMINAL_PROTOCOLS: MainThread<RefCell<Option<TerminalProtocols>>> =
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;