Skip to content

Commit

Permalink
Fix ratatui-image tmux detection when used with a configured image …
Browse files Browse the repository at this point in the history
…protocol (#352)
  • Loading branch information
Nemo157 authored Sep 17, 2024
1 parent f4492c9 commit e40a8a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1276,10 +1276,12 @@ fn picker_from_termios(protocol_type: Option<ProtocolType>) -> Option<Picker> {
},
};

// `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)
Expand Down

0 comments on commit e40a8a8

Please sign in to comment.