Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions helix-term/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub mod job;
pub mod keymap;
pub mod ui;

use std::env::var_os;
use std::path::Path;

use futures_util::Future;
Expand All @@ -27,10 +28,9 @@ fn true_color() -> bool {

#[cfg(not(windows))]
fn true_color() -> bool {
if matches!(
std::env::var("COLORTERM").map(|v| matches!(v.as_str(), "truecolor" | "24bit")),
Ok(true)
) {
if var_os("COLORTERM").is_some_and(|v| v == "truecolor" || v == "24bit")
|| var_os("WSL_DISTRO_NAME").is_some()
{
return true;
}

Expand Down