Skip to content

Commit

Permalink
Add execute_winapi on SetStyle to fix Windows compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
groves committed Jul 24, 2022
1 parent 4dcc6fc commit fafe437
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/style.rs
Expand Up @@ -366,6 +366,16 @@ impl Command for SetStyle {

Ok(())
}

#[cfg(windows)]
fn execute_winapi(&self) -> Result<()> {
panic!("tried to execute SetStyle command using WinAPI, use ANSI instead");
}

#[cfg(windows)]
fn is_ansi_code_supported(&self) -> bool {
true
}
}

/// A command that prints styled content.
Expand Down

0 comments on commit fafe437

Please sign in to comment.