Prefer novel tokens on the same line, even if there are repeats

Fixes most cases in #76, but does not help with #56.
pull/101/head
Wilfred Hughes 2022-01-15 19:38:18 +07:00
parent 50d1e29955
commit 37a18401c6
2 changed files with 9 additions and 1 deletions

@ -17,6 +17,14 @@ Improved language detection for files with bash/sh syntax.
Fixed a crash when on Mercurial diffs when a whole file has been
removed.
### Diffing
Fixed an issue where difftastic would prefer to mark earlier nodes as
unchanged, leading to novel items over multiple lines. Difftastic now
prefers marking things on the same line, as intended. (This bug was
introduced in 0.11 as an optimisation, so performance is somewhat
worse.)
### Display
Improved display performance when there are a large number of hunks.

@ -163,7 +163,7 @@ pub fn neighbours<'a>(v: &Vertex<'a>, buf: &mut [Option<(Edge, Vertex<'a>)>]) {
rhs_prev_is_novel: false,
},
));
return;
i += 1;
}
if let (