From 90150e172972f9a7a0abb4ad9c26bb7492e45e02 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Tue, 25 Jun 2024 19:54:38 +0200 Subject: [PATCH] fish_key_reader: enable terminal protocols again Fixes 29f2da8d1 (Toggle terminal protocols lazily, 2024-05-16). --- src/bin/fish_key_reader.rs | 3 ++- src/input_common.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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;