Fix a similar lint rendering issue when trimming identical lines out of patches

Authored by epriestley on Sep 5 2017, 11:50 PM.

Description

Fix a similar lint rendering issue when trimming identical lines out of patches

Summary: Ref T9846. See PHI48. See D18538 for a similar fix. We can contract the suffix lines too much if, e.g, a newline after another newline is removed. Prevent contraction to fewer than 0 lines.

Test Plan: Added a failing test, made it pass.

Reviewers: chad

Reviewed By: chad

Subscribers: alexmv

Maniphest Tasks: T9846

Differential Revision: https://secure.phabricator.com/D18541