Fix sixel support detection
@@ -55,6 +55,8 @@ impl SixelBackend {
}
buf.push(byte);
if buf.starts_with(&[0x1B, b'[', b'?']) && buf.ends_with(&[b'c']) {
+ for attribute in buf[3..(buf.len() - 1)].split(|x| *x == b';') {
+ if attribute == &[b'4'] {
unsafe {
tcsetattr(STDIN_FILENO, TCSANOW, &old_attributes);
}
@@ -63,6 +65,8 @@ impl SixelBackend {
}
}
}
+ }
+}
impl super::ImageBackend for SixelBackend {
fn add_image(&self, lines: Vec<String>, image: &DynamicImage) -> String {
