diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d8102a1..263f1d9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,9 +20,8 @@ - SML, see #1005 (@kopecs) ## New themes -## `bat` as a library -- `PrettyPrinter::vcs_modification_markers` is no longer available without the `git` feature, see #997 (@eth-p) +## `bat` as a library ## Packaging diff --git a/src/pretty_printer.rs b/src/pretty_printer.rs index da60abbd..7ce7a70c 100644 --- a/src/pretty_printer.rs +++ b/src/pretty_printer.rs @@ -165,10 +165,13 @@ impl<'a> PrettyPrinter<'a> { self } - /// Whether to show modification markers for VCS changes - #[cfg(feature = "git")] + /// Whether to show modification markers for VCS changes. This has no effect if + /// the `git` feature is not activated. pub fn vcs_modification_markers(&mut self, yes: bool) -> &mut Self { - self.active_style_components.vcs_modification_markers = yes; + #[cfg(feature = "git")] + { + self.active_style_components.vcs_modification_markers = yes; + } self }