Page MenuHomePhabricator

Correct an apparent off-by-one error when adjusting inlines across revision changes
ClosedPublic

Authored by epriestley on Aug 5 2020, 8:10 PM.
Tags
None
Referenced Files
F13086530: D21436.diff
Thu, Apr 25, 12:35 AM
Unknown Object (File)
Sat, Apr 20, 5:26 PM
Unknown Object (File)
Sat, Apr 20, 11:38 AM
Unknown Object (File)
Wed, Apr 17, 2:39 PM
Unknown Object (File)
Tue, Apr 16, 1:09 PM
Unknown Object (File)
Thu, Mar 28, 7:45 AM
Unknown Object (File)
Wed, Mar 27, 12:42 PM
Unknown Object (File)
Dec 14 2023, 8:51 PM
Subscribers
None

Details

Summary

See PHI1834. It's not obvious why this "+1" is present in the code, but it causes inlines to be adjusted incorrectly when a file is not modified across changes. See D21435.

Remove it, which appears to produce accurate adjustment behavior.

Test Plan
  • See D21435 for instructions to build a change, where a file with lines "A-Z" is unmodified across Diff 1 and Diff 2.
  • Left inlines on lines 14, 17-19, and 16-26 (end of the file) on Diff 1.
  • Before: saw inlines incorrectly adjusted to lines 15, 18, and 17 on Diff 2. Before D21435, the last inline was culled by the rendering engine.
  • After: saw inlines correctly adjusted to lines 14, 17, and 16 (the same lines as the original), render properly, and highlight the correct lines when hovered.

Diff Detail

Repository
rP Phabricator
Branch
newline2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 24824
Build 34249: Run Core Tests
Build 34248: arc lint + arc unit

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Aug 5 2020, 8:11 PM
epriestley requested review of this revision.
This revision was automatically updated to reflect the committed changes.