Make bad position data more obvious (use purple)

pull/41/head
Wilfred Hughes 2021-09-29 23:57:44 +07:00
parent d37c87a1a5
commit b747cdcb01
2 changed files with 7 additions and 1 deletions

@ -10,6 +10,12 @@ Added support for Mercuial, see [this section in the
manual](http://difftastic.wilfred.me.uk/getting_started.html#mercurial-external-diffs)
for instructions.
### Display
Characters that don't have a position in the parsed syntax tree are
now displayed in purple, to make bugs more obvious. Previously they
were dimmed.
## 0.10.1
### Build

@ -32,7 +32,7 @@ impl Style {
/// Dim any parts of the line that have no spans.
fn apply_line(line: &str, styles: &[(SingleLineSpan, Style)]) -> String {
if styles.is_empty() {
return line.dimmed().to_string();
return line.purple().to_string();
}
let mut res = String::with_capacity(line.len());