Fix issue with incorrect read marker on startup
This commit is contained in:
parent
7764fc6910
commit
40716ca649
1 changed files with 8 additions and 1 deletions
|
@ -390,7 +390,14 @@ function($rootScope,
|
||||||
buffer.lines.length = 0;
|
buffer.lines.length = 0;
|
||||||
buffer.requestedLines = 0;
|
buffer.requestedLines = 0;
|
||||||
handlers.handleLineInfo(lineinfo, false, true);
|
handlers.handleLineInfo(lineinfo, false, true);
|
||||||
|
if (oldLength > 0) {
|
||||||
|
// We're not initially loading lines into the buffer.
|
||||||
|
// Set the read marker to the beginning of the newly loaded lines
|
||||||
buffer.lastSeen = buffer.lines.length - oldLength - 1;
|
buffer.lastSeen = buffer.lines.length - oldLength - 1;
|
||||||
|
} else {
|
||||||
|
// Initial buffer open, set correct read marker position
|
||||||
|
buffer.lastSeen += buffer.lines.length;
|
||||||
|
}
|
||||||
$rootScope.loadingLines = false;
|
$rootScope.loadingLines = false;
|
||||||
$rootScope.scrollWithBuffer(true);
|
$rootScope.scrollWithBuffer(true);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue