Minor coding style improvement. Does the same as before

This commit is contained in:
Matthias Bartelmeß 2012-04-05 15:26:51 +02:00
parent 2ccc70daf6
commit ff9e407092
1 changed files with 2 additions and 5 deletions

View File

@ -2272,11 +2272,8 @@ function Ace2Inner(){
function performDocumentApplyAttributesToCharRange(start, end, attribs)
{
if (end >= rep.alltext.length)
{
end = rep.alltext.length - 1;
}
performDocumentApplyAttributesToRange(lineAndColumnFromChar(start), lineAndColumnFromChar(end), attribs);
end = Math.min(end, rep.alltext.length - 1);
documentAttributeManager.setAttributesOnRange(lineAndColumnFromChar(start), lineAndColumnFromChar(end), attribs);
}
editorInfo.ace_performDocumentApplyAttributesToCharRange = performDocumentApplyAttributesToCharRange;