mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-06-30 22:23:44 +02:00
Hack in Windows console coloring.
The code has suffered and needs refactoring/commenting. BUT... IT WORKS!
This commit is contained in:
@ -35,6 +35,7 @@ use std::thread;
|
||||
use crossbeam::sync::chase_lev::{self, Steal, Stealer};
|
||||
use grep::Grep;
|
||||
use memmap::{Mmap, Protection};
|
||||
use term::Terminal;
|
||||
use walkdir::DirEntry;
|
||||
|
||||
use args::Args;
|
||||
@ -198,11 +199,11 @@ impl Worker {
|
||||
let mut printer = self.args.printer(outbuf);
|
||||
self.do_work(&mut printer, work);
|
||||
let outbuf = printer.into_inner();
|
||||
if !outbuf.is_empty() {
|
||||
if !outbuf.get_ref().is_empty() {
|
||||
let mut out = self.out.lock().unwrap();
|
||||
out.write(&outbuf);
|
||||
}
|
||||
self.outbuf = Some(outbuf);
|
||||
self.outbuf = Some(outbuf.into_inner());
|
||||
}
|
||||
self.match_count
|
||||
}
|
||||
|
Reference in New Issue
Block a user