only try to redraw the line height of lines that exist..

pull/1716/head
John McLear 2013-04-07 19:06:15 +01:00
parent 5b1de1421c
commit f135f79d13
1 changed files with 12 additions and 7 deletions

View File

@ -5180,7 +5180,6 @@ function Ace2Inner(){
{
if(n > lineNumbersShown) //all updated, break
break;
var h = (b.clientHeight || b.offsetHeight);
if (b.nextSibling)
{
@ -5215,18 +5214,24 @@ function Ace2Inner(){
var n = lineNumbersShown;
var div = odoc.createElement("DIV");
//calculate height for new line number
if(b){
var h = (b.clientHeight || b.offsetHeight);
if (b.nextSibling)
if (b.nextSibling){
h = b.nextSibling.offsetTop - b.offsetTop;
}
}
if(h) // apply style to div
if(h){ // apply style to div
div.style.height = h +"px";
}
div.appendChild(odoc.createTextNode(String(n)));
fragment.appendChild(div);
if(b){
b = b.nextSibling;
}
}
container.appendChild(fragment);
while (lineNumbersShown > newNumLines)