Page MenuHomePhabricator

Fix an issue where the last line of block-based diffs could be incorrectly hidden
ClosedPublic

Authored by epriestley on Jan 30 2020, 4:17 PM.
Tags
None
Referenced Files
F15548024: D20959.diff
Sat, Apr 26, 9:29 PM
F15543012: D20959.id49935.diff
Fri, Apr 25, 8:11 PM
F15520876: D20959.id49935.diff
Sun, Apr 20, 9:01 AM
F15516445: D20959.id49934.diff
Fri, Apr 18, 7:02 PM
F15507643: D20959.id49935.diff
Tue, Apr 15, 9:52 PM
F15502161: D20959.diff
Sun, Apr 13, 10:50 PM
F15472379: D20959.id49935.diff
Sat, Apr 5, 12:53 PM
F15472113: D20959.diff
Sat, Apr 5, 10:58 AM
Subscribers
None

Details

Summary

Fixes T13468. See that task for discussion. The older source-rendering code mixes "line number" / "1-based" lists with "block number" / "0-based" lists and then has other bugs which cancel this out.

For block-based diffs, build an explicit block-based mask with only block numbers. This sort of sidesteps the whole issue.

Test Plan

Viewed the diff with the original reproduction case, plus various other block-based diffs, including one-block image diffs, in unified and side-by-side mode. Didn't spot any oddities.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable