We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff650e8 commit 506ac26Copy full SHA for 506ac26
helix-term/src/lib.rs
@@ -12,6 +12,7 @@ pub mod job;
12
pub mod keymap;
13
pub mod ui;
14
15
+use std::env::var_os;
16
use std::path::Path;
17
18
use futures_util::Future;
@@ -27,10 +28,9 @@ fn true_color() -> bool {
27
28
29
#[cfg(not(windows))]
30
fn true_color() -> bool {
- if matches!(
31
- std::env::var("COLORTERM").map(|v| matches!(v.as_str(), "truecolor" | "24bit")),
32
- Ok(true)
33
- ) {
+ if var_os("COLORTERM").is_some_and(|v| v == "truecolor" || v == "24bit")
+ || var_os("WSL_DISTRO_NAME").is_some()
+ {
34
return true;
35
}
36
0 commit comments