Page MenuHomePhabricator

When mapping phantom comments across changes, correct an off-by-one issue
ClosedPublic

Authored by epriestley on Feb 21 2021, 5:03 PM.
Tags
None
Referenced Files
F18783132: D21572.id.diff
Mon, Oct 13, 4:05 AM
F18770147: D21572.diff
Wed, Oct 8, 11:02 AM
F18734406: D21572.id.diff
Tue, Sep 30, 10:53 PM
F18626557: D21572.id51355.diff
Sep 16 2025, 1:31 AM
F18595709: D21572.diff
Sep 12 2025, 10:34 PM
F18571646: D21572.id51356.diff
Sep 10 2025, 5:14 AM
F18571644: D21572.id51355.diff
Sep 10 2025, 5:14 AM
F18519471: D21572.diff
Sep 5 2025, 5:24 PM
Subscribers
None

Details

Summary

Ref T13617. When an inline comment is added inside a block of added lines, it currently ends up off-by-one when porting forward.

This is a disagreement between the mapping engine and the display engine about what "offset" means. Choose the simpler of the two interpretations.

Test Plan
  • Created a revision with the diff in T13617.
  • Added an inline in the middle of the added block.
  • Updated the revision with the same diff.
    • Before: inline incorrectly moves up by one line.
    • After: inline maps correctly.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Feb 23 2021, 7:08 PM
This revision was automatically updated to reflect the committed changes.