summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/static/js/ace2_inner.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js
index 28e2f2a7..4dcd5edc 100644
--- a/src/static/js/ace2_inner.js
+++ b/src/static/js/ace2_inner.js
@@ -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;