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
F13213629: D20959.diff
Fri, May 17, 7:57 AM
F13184842: D20959.diff
Sat, May 11, 12:49 AM
Unknown Object (File)
Tue, May 7, 7:38 AM
Unknown Object (File)
Fri, May 3, 7:14 AM
Unknown Object (File)
Thu, Apr 25, 8:00 AM
Unknown Object (File)
Thu, Apr 25, 1:26 AM
Unknown Object (File)
Sat, Apr 20, 5:01 PM
Unknown Object (File)
Apr 20 2024, 4:36 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