summaryrefslogtreecommitdiffstats
path: root/src/paint.rs
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-06-06 21:43:45 -0400
committerDan Davison <dandavison7@gmail.com>2020-06-06 21:43:45 -0400
commite39da2aaa68099ab004184d9b2e6f31cffd0be3d (patch)
tree41db5341b137381cf16b67c704b918393aff0729 /src/paint.rs
parentc887a9960466654b9fde56661d924ccc600c0af5 (diff)
Use 'syntax_theme' instead of 'theme' everywhere
Diffstat (limited to 'src/paint.rs')
-rw-r--r--src/paint.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/paint.rs b/src/paint.rs
index b5ef0a49..bfd029ef 100644
--- a/src/paint.rs
+++ b/src/paint.rs
@@ -28,7 +28,7 @@ impl<'a> Painter<'a> {
pub fn new(writer: &'a mut dyn Write, config: &'a config::Config) -> Self {
let default_syntax = Self::get_syntax(&config.syntax_set, None);
// TODO: Avoid doing this.
- let dummy_highlighter = HighlightLines::new(default_syntax, &config.dummy_theme);
+ let dummy_highlighter = HighlightLines::new(default_syntax, &config.syntax_dummy_theme);
Self {
minus_lines: Vec::new(),
plus_lines: Vec::new(),
@@ -51,8 +51,8 @@ impl<'a> Painter<'a> {
}
pub fn set_highlighter(&mut self) {
- if let Some(ref theme) = self.config.theme {
- self.highlighter = HighlightLines::new(self.syntax, &theme)
+ if let Some(ref syntax_theme) = self.config.syntax_theme {
+ self.highlighter = HighlightLines::new(self.syntax, &syntax_theme)
};
}
@@ -185,7 +185,7 @@ impl<'a> Painter<'a> {
}
pub fn should_compute_syntax_highlighting(state: &State, config: &config::Config) -> bool {
- if config.theme.is_none() {
+ if config.syntax_theme.is_none() {
return false;
}
match state {