1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 01:10:58 +01:00

Fix an issue where inlines appear in the wrong place in one-up views

Summary: Ref T2009. Unchanged lines should always go above inlines; we get nonsense results otherwise.

Test Plan: Inline now shows in correct place in unified view.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2009

Differential Revision: https://secure.phabricator.com/D11987
This commit is contained in:
epriestley 2015-03-05 14:04:21 -08:00
parent 35c1dbf1f8
commit a8c9f2e8b0

View file

@ -518,7 +518,14 @@ abstract class DifferentialChangesetRenderer {
$out[] = $old_buf;
$old_buf = array();
}
if (!$primitive['htype']) {
// If this line is the same in both versions of the file, put it in
// the old line buffer. This makes sure inlines on old, unchanged
// lines end up in the right place.
$old_buf[] = $primitive;
} else {
$new_buf[] = $primitive;
}
} else if ($type == 'context' || $type == 'no-context') {
$out[] = $old_buf;
$out[] = $new_buf;