Skip to content

Commit

Permalink
Override crossterm's support for NO_COLOR. (helix-editor#10514)
Browse files Browse the repository at this point in the history
Since helix isn't usable without color support, honoring this does
nobody any good.
  • Loading branch information
kevin-vigor authored and Chirikumbrah committed Jun 15, 2024
1 parent 91ba352 commit 1bf7339
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helix-tui/src/backend/crossterm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ where
W: Write,
{
pub fn new(buffer: W, config: &EditorConfig) -> CrosstermBackend<W> {
// helix is not usable without colors, but crossterm will disable
// them by default if NO_COLOR is set in the environment. Override
// this behaviour.
crossterm::style::force_color_output(true);
CrosstermBackend {
buffer,
capabilities: Capabilities::from_env_or_default(config),
Expand Down

0 comments on commit 1bf7339

Please sign in to comment.