From e40a8a8d2e945e029b18b32da09816174e4fe8ac Mon Sep 17 00:00:00 2001 From: Nemo157 Date: Tue, 17 Sep 2024 07:12:16 +0200 Subject: [PATCH] Fix `ratatui-image` tmux detection when used with a configured image protocol (#352) --- src/base.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/base.rs b/src/base.rs index 5c6bdb9..e46088d 100644 --- a/src/base.rs +++ b/src/base.rs @@ -1276,10 +1276,12 @@ fn picker_from_termios(protocol_type: Option) -> Option { }, }; + // `guess_protocol` also does tmux detection, + // run it always then overwrite the guessed protocol if needed + picker.guess_protocol(); + if let Some(protocol_type) = protocol_type { picker.protocol_type = protocol_type; - } else { - picker.guess_protocol(); } Some(picker)