Skip to content

Commit 2f3cf06

Browse files
committed
Use the mapping for choosing order to display diffs
Properly include context in cases where the expected output had more lines than the actual output, e.g. ``` --FILE-- A A1 A C NEARBY --EXPECTF-- A B A1 B A B A B NEARBY ```
1 parent dec241c commit 2f3cf06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

run-tests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2985,7 +2985,7 @@ function generate_array_diff(array $ar1, array $ar2, bool $is_reg, array $w): ar
29852985
$l2 = $k2;
29862986
$diff[] = current($old2);
29872987
$k2 = next($old2) ? key($old2) : null;
2988-
} elseif ($k1 < $k2) {
2988+
} elseif ($k1 < $mapping[$k2]) {
29892989
$add_context_lines($k1);
29902990
$l1 = $k1;
29912991
$diff[] = current($old1);

0 commit comments

Comments
 (0)