[F] Fix background color detection timeout (#453)
This commit is contained in:
@@ -268,15 +268,15 @@ fn det_bg() -> Result<Option<Srgb<u8>>, terminal_colorsaurus::Error> {
|
|||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
|
|
||||||
background_color(QueryOptions::default())
|
match background_color(QueryOptions::default()) {
|
||||||
.map(|terminal_colorsaurus::Color { r, g, b , .. }| Some(Srgb::new(r, g, b).into_format()))
|
Ok(terminal_colorsaurus::Color { r, g, b, .. }) => {
|
||||||
.or_else(|err| {
|
Ok(Some(Srgb::new(r, g, b).into_format()))
|
||||||
if matches!(err, terminal_colorsaurus::Error::UnsupportedTerminal(_)) {
|
}
|
||||||
Ok(None)
|
Err(err) => {
|
||||||
} else {
|
debug!(?err, "failed to detect background color");
|
||||||
Err(err)
|
Ok(None)
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates config interactively.
|
/// Creates config interactively.
|
||||||
|
|||||||
Reference in New Issue
Block a user