1
0
Fork 0
mirror of https://github.com/helix-editor/helix synced 2024-05-07 11:36:04 +02:00

Override crossterm's support for NO_COLOR. (#10514)

Since helix isn't usable without color support, honoring this does
nobody any good.
This commit is contained in:
Kevin Vigor 2024-04-19 19:19:12 -06:00 committed by GitHub
parent 94405f3d07
commit 18d5cacea6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,6 +91,10 @@ impl<W> CrosstermBackend<W>
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),