summaryrefslogtreecommitdiffstats
path: root/src/pretty_printer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/pretty_printer.rs')
-rw-r--r--src/pretty_printer.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pretty_printer.rs b/src/pretty_printer.rs
index c9530bf4..89745eec 100644
--- a/src/pretty_printer.rs
+++ b/src/pretty_printer.rs
@@ -23,6 +23,7 @@ struct ActiveStyleComponents {
header: bool,
vcs_modification_markers: bool,
grid: bool,
+ rule: bool,
line_numbers: bool,
snip: bool,
}
@@ -179,6 +180,12 @@ impl<'a> PrettyPrinter<'a> {
self
}
+ /// Whether to paint a horizontal rule to delimit files
+ pub fn rule(&mut self, yes: bool) -> &mut Self {
+ self.active_style_components.rule = yes;
+ self
+ }
+
/// Whether to show modification markers for VCS changes. This has no effect if
/// the `git` feature is not activated.
#[cfg_attr(
@@ -285,6 +292,9 @@ impl<'a> PrettyPrinter<'a> {
if self.active_style_components.grid {
style_components.push(StyleComponent::Grid);
}
+ if self.active_style_components.rule {
+ style_components.push(StyleComponent::Rule);
+ }
if self.active_style_components.header {
style_components.push(StyleComponent::Header);
}