summaryrefslogtreecommitdiffstats
path: root/src/search_buffer.rs
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2016-09-25 15:01:27 -0400
committerAndrew Gallant <jamslam@gmail.com>2016-09-25 15:01:29 -0400
commit9dc5464c84cf96c8e7cba96e2b470ebd066c2393 (patch)
tree4016714c5d55db24824f6c38139aa7877f3f8c60 /src/search_buffer.rs
parent95edcd4d3a7c98d5679c890ed9875a17e54ca001 (diff)
Stop after first match is found with --quiet.
Fixes #77.
Diffstat (limited to 'src/search_buffer.rs')
-rw-r--r--src/search_buffer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/search_buffer.rs b/src/search_buffer.rs
index a3edbcb0..efc66cd7 100644
--- a/src/search_buffer.rs
+++ b/src/search_buffer.rs
@@ -104,7 +104,7 @@ impl<'a, W: Send + Terminal> BufferSearcher<'a, W> {
self.print_match(m.start(), m.end());
}
last_end = m.end();
- if self.opts.files_with_matches {
+ if self.printer.is_quiet() || self.opts.files_with_matches {
break;
}
}