@@ 605-617 (lines=13) @@ | ||
602 | } |
|
603 | } |
|
604 | ||
605 | if ($best_copy_length) { |
|
606 | $jobs[] = [ |
|
607 | $from_segment_start, |
|
608 | $best_from_start, |
|
609 | $to_segment_start, |
|
610 | $best_to_start, |
|
611 | ]; |
|
612 | $result[$best_from_start * 4 + 2] = new FineDiffCopyOp($best_copy_length); |
|
613 | $jobs[] = [ |
|
614 | $best_from_start + $best_copy_length, |
|
615 | $from_segment_end, |
|
616 | $best_to_start + $best_copy_length, |
|
617 | $to_segment_end, |
|
618 | ]; |
|
619 | } else { |
|
620 | $result[$from_segment_start * 4] = new FineDiffReplaceOp($from_segment_length, |
|
@@ 702-715 (lines=14) @@ | ||
699 | } |
|
700 | } |
|
701 | // match found |
|
702 | if ($copy_len) { |
|
703 | $jobs[] = [ |
|
704 | $from_segment_start, |
|
705 | $from_copy_start, |
|
706 | $to_segment_start, |
|
707 | $to_copy_start, |
|
708 | ]; |
|
709 | $result[$from_copy_start * 4 + 2] = new FineDiffCopyOp($copy_len); |
|
710 | $jobs[] = [ |
|
711 | $from_copy_start + $copy_len, |
|
712 | $from_segment_end, |
|
713 | $to_copy_start + $copy_len, |
|
714 | $to_segment_end, |
|
715 | ]; |
|
716 | } // no match, so delete all, insert all |
|
717 | else { |
|
718 | $result[$from_segment_start * 4] = new FineDiffReplaceOp($from_segment_len, |