Merge pull request #480 from fourplusone/ace2_inner_patch-1
fixed indention + variable scopingpull/483/merge
commit
04126690fb
|
@ -5829,11 +5829,14 @@ function OUTER(gscope)
|
|||
var newNumLines = rep.lines.length();
|
||||
if (newNumLines < 1) newNumLines = 1;
|
||||
//update height of all current line numbers
|
||||
if (currentCallStack && currentCallStack.domClean)
|
||||
{
|
||||
|
||||
var a = sideDivInner.firstChild;
|
||||
var b = doc.body.firstChild;
|
||||
var n = 0;
|
||||
|
||||
if (currentCallStack && currentCallStack.domClean)
|
||||
{
|
||||
|
||||
while (a && b)
|
||||
{
|
||||
if(n > lineNumbersShown) //all updated, break
|
||||
|
@ -5874,8 +5877,10 @@ function OUTER(gscope)
|
|||
var div = odoc.createElement("DIV");
|
||||
//calculate height for new line number
|
||||
var h = (b.clientHeight || b.offsetHeight);
|
||||
|
||||
if (b.nextSibling)
|
||||
h = b.nextSibling.offsetTop - b.offsetTop;
|
||||
|
||||
if(h) // apply style to div
|
||||
div.style.height = h +"px";
|
||||
|
||||
|
@ -5883,6 +5888,7 @@ function OUTER(gscope)
|
|||
fragment.appendChild(div);
|
||||
b = b.nextSibling;
|
||||
}
|
||||
|
||||
container.appendChild(fragment);
|
||||
while (lineNumbersShown > newNumLines)
|
||||
{
|
||||
|
@ -5891,8 +5897,8 @@ function OUTER(gscope)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
OUTER(this);
|
||||
|
||||
|
|
Loading…
Reference in New Issue