v.util: fix util.emanager.set_support_color

pull/5965/head
Delyan Angelov 2020-07-24 08:31:05 +03:00
parent ec443c65a8
commit c2083203b3
2 changed files with 7 additions and 5 deletions

View File

@ -33,11 +33,10 @@ pub fn new_builder(pref &pref.Preferences) Builder {
compiled_dir := if os.is_dir(rdir) { rdir } else { os.dir(rdir) } compiled_dir := if os.is_dir(rdir) { rdir } else { os.dir(rdir) }
table := table.new_table() table := table.new_table()
if pref.use_color == .always { if pref.use_color == .always {
// TODO util.emanager.set_support_color(true)
//util.emanager.set_support_color(true)
} }
if pref.use_color == .never { if pref.use_color == .never {
//util.emanager.set_support_color(false) util.emanager.set_support_color(false)
} }
msvc := find_msvc() or { msvc := find_msvc() or {
if pref.ccompiler == 'msvc' { if pref.ccompiler == 'msvc' {

View File

@ -39,8 +39,11 @@ pub fn new_error_manager() &EManager {
} }
} }
pub fn (mut e EManager) set_support_color(b bool) { pub fn (e &EManager) set_support_color(b bool) {
e.support_color = b unsafe {
mut me := e
me.support_color = b
}
} }
fn bold(msg string) string { fn bold(msg string) string {