Commit e40a8a8d2e

e40a8a8d2e945e029b18b32da09816174e4fe8ac

parent: f4492c9f77

Unregistered key

Nemo157 <git@nemo157.com> · 2024-09-17 05:12 UTC
committer: <noreply@github.com>

Fix `ratatui-image` tmux detection when used with a configured image protocol (#352)

Layout: unified · split

src/base.rs +4 −2
@@ -1276,10 +1276,12 @@ fn picker_from_termios(protocol_type: Option<ProtocolType>) -> Option<Picker> {
1276 }, 1276 },
1277 }; 1277 };
1278 1278
1279 // `guess_protocol` also does tmux detection,
1280 // run it always then overwrite the guessed protocol if needed
1281 picker.guess_protocol();
1282
1279 if let Some(protocol_type) = protocol_type { 1283 if let Some(protocol_type) = protocol_type {
1280 picker.protocol_type = protocol_type; 1284 picker.protocol_type = protocol_type;
1281 } else {
1282 picker.guess_protocol();
1283 } 1285 }
1284 1286
1285 Some(picker) 1287 Some(picker)