From cd7953c176c2bc71b34cc2aaa1618f6ab208538f Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Fri, 17 Jul 2020 18:49:55 -0400 Subject: Initial implementation of color-moved support - Inspect the raw hunk line - If it does not appear to be a standard minus/plus line, treat it as moved - Apply special delta color-moved-* styles --- src/style.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/style.rs') diff --git a/src/style.rs b/src/style.rs index bfdbbeae..51403130 100644 --- a/src/style.rs +++ b/src/style.rs @@ -85,6 +85,10 @@ impl Style { } } + pub fn is_applied_to(&self, s: &str) -> bool { + s.starts_with(&self.ansi_term_style.prefix().to_string()) + } + pub fn to_painted_string(&self) -> ansi_term::ANSIGenericString { self.paint(self.to_string()) } -- cgit v1.2.3