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
F19123031: D21572.id51356.diff
Dec 10 2025, 12:12 AM
F19094307: D21572.diff
Dec 4 2025, 12:21 AM
F19083440: D21572.id51356.diff
Dec 2 2025, 12:35 PM
F19046615: D21572.id51356.diff
Nov 27 2025, 11:09 AM
F18993619: D21572.id51355.diff
Nov 19 2025, 8:13 AM
F18905297: D21572.diff
Nov 8 2025, 1:38 PM
F18808914: D21572.id51355.diff
Oct 19 2025, 9:42 AM
F18797385: D21572.diff
Oct 17 2025, 4:59 AM
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.