/* We have less lines in the block than we want for
* context => keep the whole block. */
$block[] =
$edit;
} else { if ($ntrail) { /* Create a new block with as many lines as we need
* for the trailing context. */
$context =
array_slice($edit->orig, 0,
$ntrail);
$block[] =
new Text_Diff_Op_copy($context);
} /* @todo */
$output .=
$this->
_block($x0,
$ntrail +
$xi -
$x0,
$y0,
$ntrail +
$yi -
$y0,
$block);
$block = false;
} } /* Keep the copy block as the context for the next block. */
$context =
$edit->orig;
} else { /* Don't we have any diff blocks yet? */
if (!
is_array($block)) { /* Extract context lines from the preceding copy block. */