Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15400191
D21435.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D21435.diff
View Options
diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php
--- a/src/applications/differential/parser/DifferentialChangesetParser.php
+++ b/src/applications/differential/parser/DifferentialChangesetParser.php
@@ -1053,14 +1053,30 @@
$this->comments = id(new PHUIDiffInlineThreader())
->reorderAndThreadCommments($this->comments);
+ $old_max_display = 1;
+ foreach ($this->old as $old) {
+ if (isset($old['line'])) {
+ $old_max_display = $old['line'];
+ }
+ }
+
+ $new_max_display = 1;
+ foreach ($this->new as $new) {
+ if (isset($new['line'])) {
+ $new_max_display = $new['line'];
+ }
+ }
+
foreach ($this->comments as $comment) {
- $final = $comment->getLineNumber() +
- $comment->getLineLength();
- $final = max(1, $final);
+ $display_line = $comment->getLineNumber() + $comment->getLineLength();
+ $display_line = max(1, $display_line);
+
if ($this->isCommentOnRightSideWhenDisplayed($comment)) {
- $new_comments[$final][] = $comment;
+ $display_line = min($new_max_display, $display_line);
+ $new_comments[$display_line][] = $comment;
} else {
- $old_comments[$final][] = $comment;
+ $display_line = min($old_max_display, $display_line);
+ $old_comments[$display_line][] = $comment;
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 10:13 AM (5 d, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7382394
Default Alt Text
D21435.diff (1 KB)
Attached To
Mode
D21435: Recover inline comments which are "adjusted" off the end of a diff
Attached
Detach File
Event Timeline
Log In to Comment