mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Fix displaying gap context when showing first lines
Summary: Show First 20 Lines doesn't display gap context and emits error. Test Plan: Showed first 20 lines, last 20 lines, middle 20 lines - saw context and no error. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3616
This commit is contained in:
parent
a185b1b4a7
commit
58206a146f
1 changed files with 5 additions and 1 deletions
|
@ -1386,7 +1386,11 @@ final class DifferentialChangesetParser {
|
|||
//
|
||||
$depths = array();
|
||||
$last_depth = 0;
|
||||
for ($ii = $range_start + $range_len - 1; $ii >= $range_start; $ii--) {
|
||||
$range_end = $range_start + $range_len;
|
||||
if (!isset($this->new[$range_end])) {
|
||||
$range_end--;
|
||||
}
|
||||
for ($ii = $range_end; $ii >= $range_start; $ii--) {
|
||||
// We need to expand tabs to process mixed indenting and to round
|
||||
// correctly later.
|
||||
$line = str_replace("\t", " ", $this->new[$ii]['text']);
|
||||
|
|
Loading…
Reference in a new issue