@@ -994,17 +994,20 @@ static void add_lines_to_move_detection(struct diff_options *o,
}
static void pmb_advance_or_null(struct diff_options *o,
- struct moved_entry *match,
- struct hashmap *hm,
+ struct emitted_diff_symbol *l,
struct moved_block *pmb,
int pmb_nr)
{
int i;
+ unsigned flags = o->color_moved_ws_handling & XDF_WHITESPACE_FLAGS;
+
for (i = 0; i < pmb_nr; i++) {
struct moved_entry *prev = pmb[i].match;
struct moved_entry *cur = (prev && prev->next_line) ?
prev->next_line : NULL;
- if (cur && !hm->cmpfn(o, &cur->ent, &match->ent, NULL)) {
+ if (cur && xdiff_compare_lines(cur->es->line, cur->es->len,
+ l->line, l->len,
+ flags)) {
pmb[i].match = cur;
} else {
pmb[i].match = NULL;
@@ -1195,7 +1198,7 @@ static void mark_color_as_moved(struct diff_options *o,
COLOR_MOVED_WS_ALLOW_INDENTATION_CHANGE)
pmb_advance_or_null_multi_match(o, l, pmb, pmb_nr);
else
- pmb_advance_or_null(o, match, hm, pmb, pmb_nr);
+ pmb_advance_or_null(o, l, pmb, pmb_nr);
pmb_nr = shrink_potential_moved_blocks(pmb, pmb_nr);