Skip to content

Commit e40a8a8

Browse files
authored
Fix ratatui-image tmux detection when used with a configured image protocol (#352)
1 parent f4492c9 commit e40a8a8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/base.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1276,10 +1276,12 @@ fn picker_from_termios(protocol_type: Option<ProtocolType>) -> Option<Picker> {
12761276
},
12771277
};
12781278

1279+
// `guess_protocol` also does tmux detection,
1280+
// run it always then overwrite the guessed protocol if needed
1281+
picker.guess_protocol();
1282+
12791283
if let Some(protocol_type) = protocol_type {
12801284
picker.protocol_type = protocol_type;
1281-
} else {
1282-
picker.guess_protocol();
12831285
}
12841286

12851287
Some(picker)

0 commit comments

Comments
 (0)