diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-05-30 21:56:10 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-05-30 22:13:36 -0400 |
commit | eec0fb23cfcf64cd2a5da78895112ce7fe3f1108 (patch) | |
tree | d6fdc6c31a8c25a1be86795285c04276cf0883c9 /src/paint.rs | |
parent | 503ae23ad78562284b832ab2463b0955c1c664bb (diff) |
Hack: add boolean to Style struct to identify non-emph styles
This isn't a correct approach. The problem being addressed is that
currently, Style instances are being used to represent things like the
presence of an emph section in a line with edit annotations. A
consequence is that if an emph and non-emph section are styled the
same, then it's impossible to tell that the sections are different in
any way at all. I think the correct approach is probably to start
using a Struct that models elements such as emph/non-emph to represent
these things, and make each such struct instance possess a style.
Diffstat (limited to 'src/paint.rs')
-rw-r--r-- | src/paint.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/paint.rs b/src/paint.rs index b975193d..6a827e5d 100644 --- a/src/paint.rs +++ b/src/paint.rs @@ -417,6 +417,7 @@ mod superimpose_style_sections { is_underline: true, ..ansi_term::Style::new() }, + is_emph: false, is_omitted: false, is_raw: false, is_syntax_highlighted: true, @@ -431,6 +432,7 @@ mod superimpose_style_sections { is_underline: true, ..ansi_term::Style::new() }, + is_emph: false, is_omitted: false, is_raw: false, is_syntax_highlighted: false, @@ -445,6 +447,7 @@ mod superimpose_style_sections { is_underline: true, ..ansi_term::Style::new() }, + is_emph: false, is_omitted: false, is_raw: false, is_syntax_highlighted: true, |