Fixed issue with rendering of initially empty documents

This commit is contained in:
Aaron 2010-12-09 20:27:15 +08:00 committed by Fabian Jakobs
commit deb757ae3f

View file

@ -399,7 +399,7 @@ var VirtualRenderer = function(container, theme) {
var lineCount = Math.ceil(minHeight / this.lineHeight);
var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));
var lastRow = Math.min(this.lines.length, firstRow + lineCount) - 1;
var lastRow = Math.max(0, Math.min(this.lines.length, firstRow + lineCount) - 1);
var layerConfig = this.layerConfig = {
width : longestLine,