Fix the one-line-only-bug

Fixes #247
This commit is contained in:
Lorenz Hübschle-Schneider 2014-04-20 20:44:01 +02:00
parent 81c5974369
commit ac4e130198
1 changed files with 4 additions and 0 deletions

View File

@ -419,6 +419,10 @@ function($rootScope,
var fetchMoreLines = function(numLines) { var fetchMoreLines = function(numLines) {
var buffer = models.getActiveBuffer(); var buffer = models.getActiveBuffer();
if (numLines === undefined) {
// Math.max(undefined, *) = NaN -> need a number here
numLines = 0;
}
// Calculate number of lines to fetch, at least as many as the parameter // Calculate number of lines to fetch, at least as many as the parameter
numLines = Math.max(numLines, buffer.requestedLines * 2); numLines = Math.max(numLines, buffer.requestedLines * 2);