Ensure ansi mode windows (#2494)

* WIP - compiling but not working

* semi-working

* making progress

* working except for table lines

* fmt + clippy

* cleaned up some comments

* working line colors

* fmt, clippy, updated sample config.toml

* merges

* ensure ansi mode is enabled on windows
ansi mode sometimes gets out of sync in Windows.
I'm not sure why but this appears to fix it.
This commit is contained in:
Darren Schroeder 2020-09-04 14:24:46 -05:00 committed by GitHub
parent 4696c9069b
commit 2ae2f2ea9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -750,6 +750,11 @@ impl WrappedTable {
}
fn new_print_table(&self, color_hm: &HashMap<String, Style>) {
#[cfg(windows)]
{
let _ = ansi_term::enable_ansi_support();
}
if self.data.is_empty() {
return;
}