diff --git a/src/applications/differential/controller/DifferentialChangesetViewController.php b/src/applications/differential/controller/DifferentialChangesetViewController.php index c2bd4bf8de..9d02202f9f 100644 --- a/src/applications/differential/controller/DifferentialChangesetViewController.php +++ b/src/applications/differential/controller/DifferentialChangesetViewController.php @@ -390,10 +390,20 @@ final class DifferentialChangesetViewController extends DifferentialController { return array(); } + $change_type = $changeset->getChangeType(); + if (DifferentialChangeType::isDeleteChangeType($change_type)) { + // If this is a lint message on a deleted file, show it on the left + // side of the UI because there are no source code lines on the right + // side of the UI so inlines don't have anywhere to render. See PHI416. + $is_new = 0; + } else { + $is_new = 1; + } + $template = id(new DifferentialInlineComment()) - ->setChangesetID($changeset->getID()) - ->setIsNewFile(1) - ->setLineLength(0); + ->setChangesetID($changeset->getID()) + ->setIsNewFile($is_new) + ->setLineLength(0); $inlines = array(); foreach ($messages as $message) {