Skip to content

Commit

Permalink
Fix code review remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Rudnyh committed Feb 1, 2016
1 parent 48e5de4 commit 771f93d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/VT100Grid.m
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ - (int)resetWithLineBuffer:(LineBuffer *)lineBuffer
self.scrollRegionRows = VT100GridRangeMake(0, size_.height);
self.scrollRegionCols = VT100GridRangeMake(0, size_.width);
int numLinesToScroll;
if (preservePromptLines > 0) {
numLinesToScroll = cursor_.y - preservePromptLines + 1;
if (preservePromptLines > 0 && preservePromptLines < size_.height)
numLinesToScroll = MAX(0, cursor_.y - preservePromptLines + 1);
} else {
numLinesToScroll = [self lineNumberOfLastNonEmptyLine] + 1;
}
Expand Down

0 comments on commit 771f93d

Please sign in to comment.