From 280791c0f5987f9afc8dbba98472009f08603c26 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Tue, 30 Sep 2025 18:41:17 +0200 Subject: [PATCH] Increase escape sequence timeout while waiting for query response Running "fish -d reader" inside SSH inside Windows terminal sometimes results in hangs on startup (or whenever we run "scrollback-push"), because not all of the Primary DA response is available for reading at once: reader: Incomplete escape sequence: \e\[?61\;4\;6\;7\;14\;21\;22\;23\;24\;28\;32 Work around this by increasing the read timeout while we're waiting for query responses. We should try to find a better (more comprehensive?) fix in future, but for the patch release, this small change will do. Fixes #11841 (cherry picked from commit abd23d2a1b257beba1cfe6c73d2e5ad51663293a) --- CHANGELOG.rst | 1 + src/input_common.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d1177cafc..694982e4f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,6 +11,7 @@ This release fixes the following regressions identified in 4.1.0: Since ``LC_MESSAGES`` is not exported, it will not affect fish's child processes. - Some :doc:`fish_config ` subcommands for prompts and themes were broken in standalone Linux builds (those using the ``embed-data`` cargo feature), which has been fixed (:issue:`11832`). +- On Windows Terminal, we observed an issue where fish would fail to read a response to startup queries, causing brief hangs and a misleading error message. A workaround has been added (:issue:`11841`). - Our new workaround for WezTerm's `issues with modifyOtherKeys `__ breaking shifted keys was broken on some versions of WezTerm, which has been fixed (:issue:`11204`). - Fixed a crash in :doc:`the web-based configuration tool ` when using the new underline styles (:issue:`11840`). diff --git a/src/input_common.rs b/src/input_common.rs index fbe8e0efb..989a4cccc 100644 --- a/src/input_common.rs +++ b/src/input_common.rs @@ -984,7 +984,10 @@ fn try_readb(&mut self, buffer: &mut Vec) -> Option { if !check_fd_readable( fd, Duration::from_millis( - if self.paste_is_buffering() || get_kitty_keyboard_capability() == Some(&true) { + if self.paste_is_buffering() + || self.is_blocked_querying() + || get_kitty_keyboard_capability() == Some(&true) + { 300 } else { 1