Merge branch 'master' into doc/api

This commit is contained in:
Garen Torikian 2012-02-13 12:34:25 -08:00
commit 870fe2c74e
47 changed files with 420 additions and 341 deletions

View file

@ -117,6 +117,7 @@ After the checkout Ace works out of the box. No build step is required. Open 'ed
Or using Node.JS
```bash
npm install mime
./static.js
```

View file

@ -117,6 +117,7 @@ After the checkout Ace works out of the box. No build step is required. Open 'ed
Or using Node.JS
```bash
npm install mime
./static.js
```

View file

@ -645,9 +645,9 @@ bindDropdown("split", function(value) {
} else {
var newEditor = (sp.getSplits() == 1);
if (value == "below") {
sp.setOriantation(sp.BELOW);
sp.setOrientation(sp.BELOW);
} else {
sp.setOriantation(sp.BESIDE);
sp.setOrientation(sp.BESIDE);
}
sp.setSplits(2);
@ -2992,7 +2992,7 @@ exports.cssText = ".ace-tm .ace_editor {\
}\
\
.ace-tm .ace_fold {\
background-color: #0000A2;\
background-color: #6B72E6;\
}\
\
.ace-tm .ace_text-layer {\
@ -11854,7 +11854,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -11862,7 +11862,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -11911,17 +11911,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",
@ -13232,7 +13232,7 @@ var ColdfusionHighlightRules = function() {
}, {
token : "meta.tag",
regex : "<(?=\s*style)",
next : "css"
next : "style"
}, {
token : "meta.tag", // opening tag
regex : "<\\/?",
@ -13271,7 +13271,7 @@ var ColdfusionHighlightRules = function() {
};
xml_util.tag(this.$rules, "tag", "start");
xml_util.tag(this.$rules, "css", "css-start");
xml_util.tag(this.$rules, "style", "css-start");
xml_util.tag(this.$rules, "script", "js-start");
this.embedRules(JavaScriptHighlightRules, "js-", [{
@ -13940,7 +13940,7 @@ var HtmlHighlightRules = function() {
}, {
token : "meta.tag",
regex : "<(?=\s*style\\b)",
next : "css"
next : "style"
}, {
token : "meta.tag", // opening tag
regex : "<\\/?",
@ -13979,7 +13979,7 @@ var HtmlHighlightRules = function() {
};
xmlUtil.tag(this.$rules, "tag", "start");
xmlUtil.tag(this.$rules, "css", "css-start");
xmlUtil.tag(this.$rules, "style", "css-start");
xmlUtil.tag(this.$rules, "script", "js-start");
this.embedRules(JavaScriptHighlightRules, "js-", [{
@ -24677,7 +24677,9 @@ var VirtualRenderer = function(container, theme) {
this.scrollLeft = 0;
event.addListener(this.scroller, "scroll", function() {
_self.session.setScrollLeft(_self.scroller.scrollLeft);
var scrollLeft = _self.scroller.scrollLeft;
_self.scrollLeft = scrollLeft;
_self.session.setScrollLeft(scrollLeft);
});
this.cursorPos = {
@ -24976,7 +24978,7 @@ var VirtualRenderer = function(container, theme) {
};
this.$renderChanges = function(changes) {
if (!changes || !this.session)
if (!changes || !this.session || !this.container.offsetWidth)
return;
// text, scrolling and resize changes can cause the view port size to change
@ -24988,20 +24990,33 @@ var VirtualRenderer = function(container, theme) {
)
this.$computeLayerConfig();
// horizontal scrolling
if (changes & this.CHANGE_H_SCROLL) {
this.scroller.scrollLeft = this.scrollLeft;
// read the value after writing it since the value might get clipped
var scrollLeft = this.scroller.scrollLeft;
this.scrollLeft = scrollLeft;
this.session.setScrollLeft(scrollLeft);
}
// full
if (changes & this.CHANGE_FULL) {
this.$textLayer.checkForSizeChanges();
// update scrollbar first to not lose scroll position when gutter calls resize
this.$updateScrollBar();
this.$textLayer.update(this.layerConfig);
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
this.$markerBack.update(this.layerConfig);
this.$markerFront.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar();
return;
}
// scrolling
if (changes & this.CHANGE_SCROLL) {
this.$updateScrollBar();
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
this.$textLayer.update(this.layerConfig);
else
@ -25012,7 +25027,6 @@ var VirtualRenderer = function(container, theme) {
this.$markerBack.update(this.layerConfig);
this.$markerFront.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar();
return;
}
@ -25022,10 +25036,11 @@ var VirtualRenderer = function(container, theme) {
this.$gutterLayer.update(this.layerConfig);
}
else if (changes & this.CHANGE_LINES) {
this.$updateLines();
this.$updateScrollBar();
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
if (this.$updateLines()) {
this.$updateScrollBar();
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
}
} else if (changes & this.CHANGE_GUTTER) {
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
@ -25044,11 +25059,6 @@ var VirtualRenderer = function(container, theme) {
if (changes & this.CHANGE_SIZE)
this.$updateScrollBar();
if (changes & this.CHANGE_H_SCROLL) {
//this.content.style.left = -this.scrollLeft + "px";
this.scroller.scrollLeft = this.scrollLeft
}
};
this.$computeLayerConfig = function() {
@ -25062,9 +25072,13 @@ var VirtualRenderer = function(container, theme) {
var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
var horizScrollChanged = this.$horizScroll !== horizScroll;
this.$horizScroll = horizScroll;
if (horizScrollChanged)
if (horizScrollChanged) {
this.scroller.style.overflowX = horizScroll ? "scroll" : "hidden";
// when we hide scrollbar scroll event isn't emited
// leaving session with wrong scrollLeft value
if (!horizScroll)
this.session.setScrollLeft(0);
}
var maxHeight = this.session.getScreenLength() * this.lineHeight;
this.session.setScrollTop(Math.max(0, Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight)));
@ -25145,6 +25159,7 @@ var VirtualRenderer = function(container, theme) {
// else update only the changed rows
this.$textLayer.updateLines(layerConfig, firstRow, lastRow);
return true;
};
this.$getLongestLine = function() {
@ -25233,7 +25248,7 @@ var VirtualRenderer = function(container, theme) {
};
this.getScrollLeft = function() {
return this.session.getScrollTop();
return this.session.getScrollLeft();
};
this.getScrollTopRow = function() {
@ -25270,10 +25285,9 @@ var VirtualRenderer = function(container, theme) {
if (scrollLeft <= this.$padding)
scrollLeft = 0;
if (this.scrollLeft !== scrollLeft) {
this.$loop.schedule(this.CHANGE_H_SCROLL);
if (this.scrollLeft !== scrollLeft)
this.scrollLeft = scrollLeft;
}
this.$loop.schedule(this.CHANGE_H_SCROLL);
};
this.scrollBy = function(deltaX, deltaY) {
@ -25293,12 +25307,10 @@ var VirtualRenderer = function(container, theme) {
var canvasPos = this.scroller.getBoundingClientRect();
var col = Math.round(
(pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft())
/ this.characterWidth
(pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft()) / this.characterWidth
);
var row = Math.floor(
(pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop())
/ this.lineHeight
(pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop()) / this.lineHeight
);
return this.session.screenToDocumentPosition(row, Math.max(col, 0));
@ -25964,6 +25976,11 @@ var Text = function(parentEl) {
}
}
// Size and width can be null if the editor is not visible or
// detached from the document
if (!this.element.offsetWidth)
return null;
var style = this.$measureNode.style;
var computedStyle = dom.computedStyle(this.element);
@ -26738,12 +26755,6 @@ define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?fa
" cursor: text;\n" +
"}\n" +
"\n" +
"/* setting pointer-events: auto; on node under the mouse, which changes during scroll,\n" +
" will break mouse wheel scrolling in Safari */\n" +
".ace_content * {\n" +
" pointer-events: none;\n" +
"}\n" +
"\n" +
".ace_composition {\n" +
" position: absolute;\n" +
" background: #555;\n" +
@ -26751,12 +26762,6 @@ define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?fa
" z-index: 4;\n" +
"}\n" +
"\n" +
".ace_gutter .ace_layer {\n" +
" position: relative;\n" +
" min-width: 54px;\n" +
" text-align: right;\n" +
"}\n" +
"\n" +
".ace_gutter {\n" +
" position: absolute;\n" +
" overflow : hidden;\n" +
@ -26841,6 +26846,16 @@ define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?fa
" box-sizing: border-box;\n" +
" -moz-box-sizing: border-box;\n" +
" -webkit-box-sizing: border-box;\n" +
" /* setting pointer-events: auto; on node under the mouse, which changes\n" +
" during scroll, will break mouse wheel scrolling in Safari */\n" +
" pointer-events: none;\n" +
"}\n" +
"\n" +
".ace_gutter .ace_layer {\n" +
" position: relative;\n" +
" min-width: 40px;\n" +
" text-align: right;\n" +
" pointer-events: auto;\n" +
"}\n" +
"\n" +
".ace_text-layer {\n" +
@ -26938,7 +26953,7 @@ define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?fa
" cursor: move;\n" +
"}\n" +
"\n" +
".ace_folding-enabled .ace_gutter-cell {\n" +
".ace_folding-enabled > .ace_gutter-cell {\n" +
" padding-right: 13px;\n" +
"}\n" +
"\n" +

View file

@ -59,7 +59,7 @@ exports.cssText = ".ace-tm .ace_editor {\
}\
\
.ace-tm .ace_fold {\
background-color: #0000A2;\
background-color: #6B72E6;\
}\
\
.ace-tm .ace_text-layer {\

View file

@ -11,7 +11,7 @@
Ace
version 0.2.0
commit 6e0a9ce53d9908482db7ad014a41f693fdaa1f51
commit 67ba8f5f29ed1d0c3b3d31229d5597a99860f21c
-->

File diff suppressed because one or more lines are too long

View file

@ -11662,7 +11662,9 @@ var VirtualRenderer = function(container, theme) {
this.scrollLeft = 0;
event.addListener(this.scroller, "scroll", function() {
_self.session.setScrollLeft(_self.scroller.scrollLeft);
var scrollLeft = _self.scroller.scrollLeft;
_self.scrollLeft = scrollLeft;
_self.session.setScrollLeft(scrollLeft);
});
this.cursorPos = {
@ -11961,7 +11963,7 @@ var VirtualRenderer = function(container, theme) {
};
this.$renderChanges = function(changes) {
if (!changes || !this.session)
if (!changes || !this.session || !this.container.offsetWidth)
return;
// text, scrolling and resize changes can cause the view port size to change
@ -11973,20 +11975,33 @@ var VirtualRenderer = function(container, theme) {
)
this.$computeLayerConfig();
// horizontal scrolling
if (changes & this.CHANGE_H_SCROLL) {
this.scroller.scrollLeft = this.scrollLeft;
// read the value after writing it since the value might get clipped
var scrollLeft = this.scroller.scrollLeft;
this.scrollLeft = scrollLeft;
this.session.setScrollLeft(scrollLeft);
}
// full
if (changes & this.CHANGE_FULL) {
this.$textLayer.checkForSizeChanges();
// update scrollbar first to not lose scroll position when gutter calls resize
this.$updateScrollBar();
this.$textLayer.update(this.layerConfig);
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
this.$markerBack.update(this.layerConfig);
this.$markerFront.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar();
return;
}
// scrolling
if (changes & this.CHANGE_SCROLL) {
this.$updateScrollBar();
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
this.$textLayer.update(this.layerConfig);
else
@ -11997,7 +12012,6 @@ var VirtualRenderer = function(container, theme) {
this.$markerBack.update(this.layerConfig);
this.$markerFront.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar();
return;
}
@ -12007,10 +12021,11 @@ var VirtualRenderer = function(container, theme) {
this.$gutterLayer.update(this.layerConfig);
}
else if (changes & this.CHANGE_LINES) {
this.$updateLines();
this.$updateScrollBar();
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
if (this.$updateLines()) {
this.$updateScrollBar();
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
}
} else if (changes & this.CHANGE_GUTTER) {
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
@ -12029,11 +12044,6 @@ var VirtualRenderer = function(container, theme) {
if (changes & this.CHANGE_SIZE)
this.$updateScrollBar();
if (changes & this.CHANGE_H_SCROLL) {
//this.content.style.left = -this.scrollLeft + "px";
this.scroller.scrollLeft = this.scrollLeft
}
};
this.$computeLayerConfig = function() {
@ -12047,9 +12057,13 @@ var VirtualRenderer = function(container, theme) {
var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
var horizScrollChanged = this.$horizScroll !== horizScroll;
this.$horizScroll = horizScroll;
if (horizScrollChanged)
if (horizScrollChanged) {
this.scroller.style.overflowX = horizScroll ? "scroll" : "hidden";
// when we hide scrollbar scroll event isn't emited
// leaving session with wrong scrollLeft value
if (!horizScroll)
this.session.setScrollLeft(0);
}
var maxHeight = this.session.getScreenLength() * this.lineHeight;
this.session.setScrollTop(Math.max(0, Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight)));
@ -12130,6 +12144,7 @@ var VirtualRenderer = function(container, theme) {
// else update only the changed rows
this.$textLayer.updateLines(layerConfig, firstRow, lastRow);
return true;
};
this.$getLongestLine = function() {
@ -12218,7 +12233,7 @@ var VirtualRenderer = function(container, theme) {
};
this.getScrollLeft = function() {
return this.session.getScrollTop();
return this.session.getScrollLeft();
};
this.getScrollTopRow = function() {
@ -12255,10 +12270,9 @@ var VirtualRenderer = function(container, theme) {
if (scrollLeft <= this.$padding)
scrollLeft = 0;
if (this.scrollLeft !== scrollLeft) {
this.$loop.schedule(this.CHANGE_H_SCROLL);
if (this.scrollLeft !== scrollLeft)
this.scrollLeft = scrollLeft;
}
this.$loop.schedule(this.CHANGE_H_SCROLL);
};
this.scrollBy = function(deltaX, deltaY) {
@ -12278,12 +12292,10 @@ var VirtualRenderer = function(container, theme) {
var canvasPos = this.scroller.getBoundingClientRect();
var col = Math.round(
(pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft())
/ this.characterWidth
(pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft()) / this.characterWidth
);
var row = Math.floor(
(pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop())
/ this.lineHeight
(pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop()) / this.lineHeight
);
return this.session.screenToDocumentPosition(row, Math.max(col, 0));
@ -12949,6 +12961,11 @@ var Text = function(parentEl) {
}
}
// Size and width can be null if the editor is not visible or
// detached from the document
if (!this.element.offsetWidth)
return null;
var style = this.$measureNode.style;
var computedStyle = dom.computedStyle(this.element);
@ -13723,12 +13740,6 @@ ace.define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/cs
" cursor: text;\n" +
"}\n" +
"\n" +
"/* setting pointer-events: auto; on node under the mouse, which changes during scroll,\n" +
" will break mouse wheel scrolling in Safari */\n" +
".ace_content * {\n" +
" pointer-events: none;\n" +
"}\n" +
"\n" +
".ace_composition {\n" +
" position: absolute;\n" +
" background: #555;\n" +
@ -13736,12 +13747,6 @@ ace.define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/cs
" z-index: 4;\n" +
"}\n" +
"\n" +
".ace_gutter .ace_layer {\n" +
" position: relative;\n" +
" min-width: 54px;\n" +
" text-align: right;\n" +
"}\n" +
"\n" +
".ace_gutter {\n" +
" position: absolute;\n" +
" overflow : hidden;\n" +
@ -13826,6 +13831,16 @@ ace.define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/cs
" box-sizing: border-box;\n" +
" -moz-box-sizing: border-box;\n" +
" -webkit-box-sizing: border-box;\n" +
" /* setting pointer-events: auto; on node under the mouse, which changes\n" +
" during scroll, will break mouse wheel scrolling in Safari */\n" +
" pointer-events: none;\n" +
"}\n" +
"\n" +
".ace_gutter .ace_layer {\n" +
" position: relative;\n" +
" min-width: 40px;\n" +
" text-align: right;\n" +
" pointer-events: auto;\n" +
"}\n" +
"\n" +
".ace_text-layer {\n" +
@ -13923,7 +13938,7 @@ ace.define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/cs
" cursor: move;\n" +
"}\n" +
"\n" +
".ace_folding-enabled .ace_gutter-cell {\n" +
".ace_folding-enabled > .ace_gutter-cell {\n" +
" padding-right: 13px;\n" +
"}\n" +
"\n" +
@ -14043,7 +14058,7 @@ exports.cssText = ".ace-tm .ace_editor {\
}\
\
.ace-tm .ace_fold {\
background-color: #0000A2;\
background-color: #6B72E6;\
}\
\
.ace-tm .ace_text-layer {\

View file

@ -11662,7 +11662,9 @@ var VirtualRenderer = function(container, theme) {
this.scrollLeft = 0;
event.addListener(this.scroller, "scroll", function() {
_self.session.setScrollLeft(_self.scroller.scrollLeft);
var scrollLeft = _self.scroller.scrollLeft;
_self.scrollLeft = scrollLeft;
_self.session.setScrollLeft(scrollLeft);
});
this.cursorPos = {
@ -11961,7 +11963,7 @@ var VirtualRenderer = function(container, theme) {
};
this.$renderChanges = function(changes) {
if (!changes || !this.session)
if (!changes || !this.session || !this.container.offsetWidth)
return;
// text, scrolling and resize changes can cause the view port size to change
@ -11973,20 +11975,33 @@ var VirtualRenderer = function(container, theme) {
)
this.$computeLayerConfig();
// horizontal scrolling
if (changes & this.CHANGE_H_SCROLL) {
this.scroller.scrollLeft = this.scrollLeft;
// read the value after writing it since the value might get clipped
var scrollLeft = this.scroller.scrollLeft;
this.scrollLeft = scrollLeft;
this.session.setScrollLeft(scrollLeft);
}
// full
if (changes & this.CHANGE_FULL) {
this.$textLayer.checkForSizeChanges();
// update scrollbar first to not lose scroll position when gutter calls resize
this.$updateScrollBar();
this.$textLayer.update(this.layerConfig);
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
this.$markerBack.update(this.layerConfig);
this.$markerFront.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar();
return;
}
// scrolling
if (changes & this.CHANGE_SCROLL) {
this.$updateScrollBar();
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
this.$textLayer.update(this.layerConfig);
else
@ -11997,7 +12012,6 @@ var VirtualRenderer = function(container, theme) {
this.$markerBack.update(this.layerConfig);
this.$markerFront.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar();
return;
}
@ -12007,10 +12021,11 @@ var VirtualRenderer = function(container, theme) {
this.$gutterLayer.update(this.layerConfig);
}
else if (changes & this.CHANGE_LINES) {
this.$updateLines();
this.$updateScrollBar();
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
if (this.$updateLines()) {
this.$updateScrollBar();
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
}
} else if (changes & this.CHANGE_GUTTER) {
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
@ -12029,11 +12044,6 @@ var VirtualRenderer = function(container, theme) {
if (changes & this.CHANGE_SIZE)
this.$updateScrollBar();
if (changes & this.CHANGE_H_SCROLL) {
//this.content.style.left = -this.scrollLeft + "px";
this.scroller.scrollLeft = this.scrollLeft
}
};
this.$computeLayerConfig = function() {
@ -12047,9 +12057,13 @@ var VirtualRenderer = function(container, theme) {
var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
var horizScrollChanged = this.$horizScroll !== horizScroll;
this.$horizScroll = horizScroll;
if (horizScrollChanged)
if (horizScrollChanged) {
this.scroller.style.overflowX = horizScroll ? "scroll" : "hidden";
// when we hide scrollbar scroll event isn't emited
// leaving session with wrong scrollLeft value
if (!horizScroll)
this.session.setScrollLeft(0);
}
var maxHeight = this.session.getScreenLength() * this.lineHeight;
this.session.setScrollTop(Math.max(0, Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight)));
@ -12130,6 +12144,7 @@ var VirtualRenderer = function(container, theme) {
// else update only the changed rows
this.$textLayer.updateLines(layerConfig, firstRow, lastRow);
return true;
};
this.$getLongestLine = function() {
@ -12218,7 +12233,7 @@ var VirtualRenderer = function(container, theme) {
};
this.getScrollLeft = function() {
return this.session.getScrollTop();
return this.session.getScrollLeft();
};
this.getScrollTopRow = function() {
@ -12255,10 +12270,9 @@ var VirtualRenderer = function(container, theme) {
if (scrollLeft <= this.$padding)
scrollLeft = 0;
if (this.scrollLeft !== scrollLeft) {
this.$loop.schedule(this.CHANGE_H_SCROLL);
if (this.scrollLeft !== scrollLeft)
this.scrollLeft = scrollLeft;
}
this.$loop.schedule(this.CHANGE_H_SCROLL);
};
this.scrollBy = function(deltaX, deltaY) {
@ -12278,12 +12292,10 @@ var VirtualRenderer = function(container, theme) {
var canvasPos = this.scroller.getBoundingClientRect();
var col = Math.round(
(pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft())
/ this.characterWidth
(pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft()) / this.characterWidth
);
var row = Math.floor(
(pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop())
/ this.lineHeight
(pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop()) / this.lineHeight
);
return this.session.screenToDocumentPosition(row, Math.max(col, 0));
@ -12949,6 +12961,11 @@ var Text = function(parentEl) {
}
}
// Size and width can be null if the editor is not visible or
// detached from the document
if (!this.element.offsetWidth)
return null;
var style = this.$measureNode.style;
var computedStyle = dom.computedStyle(this.element);
@ -13723,12 +13740,6 @@ define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?fa
" cursor: text;\n" +
"}\n" +
"\n" +
"/* setting pointer-events: auto; on node under the mouse, which changes during scroll,\n" +
" will break mouse wheel scrolling in Safari */\n" +
".ace_content * {\n" +
" pointer-events: none;\n" +
"}\n" +
"\n" +
".ace_composition {\n" +
" position: absolute;\n" +
" background: #555;\n" +
@ -13736,12 +13747,6 @@ define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?fa
" z-index: 4;\n" +
"}\n" +
"\n" +
".ace_gutter .ace_layer {\n" +
" position: relative;\n" +
" min-width: 54px;\n" +
" text-align: right;\n" +
"}\n" +
"\n" +
".ace_gutter {\n" +
" position: absolute;\n" +
" overflow : hidden;\n" +
@ -13826,6 +13831,16 @@ define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?fa
" box-sizing: border-box;\n" +
" -moz-box-sizing: border-box;\n" +
" -webkit-box-sizing: border-box;\n" +
" /* setting pointer-events: auto; on node under the mouse, which changes\n" +
" during scroll, will break mouse wheel scrolling in Safari */\n" +
" pointer-events: none;\n" +
"}\n" +
"\n" +
".ace_gutter .ace_layer {\n" +
" position: relative;\n" +
" min-width: 40px;\n" +
" text-align: right;\n" +
" pointer-events: auto;\n" +
"}\n" +
"\n" +
".ace_text-layer {\n" +
@ -13923,7 +13938,7 @@ define("text!ace/css/editor.css", [], "@import url(//fonts.googleapis.com/css?fa
" cursor: move;\n" +
"}\n" +
"\n" +
".ace_folding-enabled .ace_gutter-cell {\n" +
".ace_folding-enabled > .ace_gutter-cell {\n" +
" padding-right: 13px;\n" +
"}\n" +
"\n" +
@ -14043,7 +14058,7 @@ exports.cssText = ".ace-tm .ace_editor {\
}\
\
.ace-tm .ace_fold {\
background-color: #0000A2;\
background-color: #6B72E6;\
}\
\
.ace-tm .ace_text-layer {\

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -295,7 +295,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -303,7 +303,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -352,17 +352,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",
@ -2468,7 +2468,7 @@ var ColdfusionHighlightRules = function() {
}, {
token : "meta.tag",
regex : "<(?=\s*style)",
next : "css"
next : "style"
}, {
token : "meta.tag", // opening tag
regex : "<\\/?",
@ -2507,7 +2507,7 @@ var ColdfusionHighlightRules = function() {
};
xml_util.tag(this.$rules, "tag", "start");
xml_util.tag(this.$rules, "css", "css-start");
xml_util.tag(this.$rules, "style", "css-start");
xml_util.tag(this.$rules, "script", "js-start");
this.embedRules(JavaScriptHighlightRules, "js-", [{

View file

@ -295,7 +295,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -303,7 +303,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -352,17 +352,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",
@ -2468,7 +2468,7 @@ var ColdfusionHighlightRules = function() {
}, {
token : "meta.tag",
regex : "<(?=\s*style)",
next : "css"
next : "style"
}, {
token : "meta.tag", // opening tag
regex : "<\\/?",
@ -2507,7 +2507,7 @@ var ColdfusionHighlightRules = function() {
};
xml_util.tag(this.$rules, "tag", "start");
xml_util.tag(this.$rules, "css", "css-start");
xml_util.tag(this.$rules, "style", "css-start");
xml_util.tag(this.$rules, "script", "js-start");
this.embedRules(JavaScriptHighlightRules, "js-", [{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1813,7 +1813,7 @@ var HtmlHighlightRules = function() {
}, {
token : "meta.tag",
regex : "<(?=\s*style\\b)",
next : "css"
next : "style"
}, {
token : "meta.tag", // opening tag
regex : "<\\/?",
@ -1852,7 +1852,7 @@ var HtmlHighlightRules = function() {
};
xmlUtil.tag(this.$rules, "tag", "start");
xmlUtil.tag(this.$rules, "css", "css-start");
xmlUtil.tag(this.$rules, "style", "css-start");
xmlUtil.tag(this.$rules, "script", "js-start");
this.embedRules(JavaScriptHighlightRules, "js-", [{
@ -1934,7 +1934,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -1942,7 +1942,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -1991,17 +1991,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",

View file

@ -1813,7 +1813,7 @@ var HtmlHighlightRules = function() {
}, {
token : "meta.tag",
regex : "<(?=\s*style\\b)",
next : "css"
next : "style"
}, {
token : "meta.tag", // opening tag
regex : "<\\/?",
@ -1852,7 +1852,7 @@ var HtmlHighlightRules = function() {
};
xmlUtil.tag(this.$rules, "tag", "start");
xmlUtil.tag(this.$rules, "css", "css-start");
xmlUtil.tag(this.$rules, "style", "css-start");
xmlUtil.tag(this.$rules, "script", "js-start");
this.embedRules(JavaScriptHighlightRules, "js-", [{
@ -1934,7 +1934,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -1942,7 +1942,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -1991,17 +1991,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1589,7 +1589,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -1597,7 +1597,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -1646,17 +1646,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",
@ -2559,7 +2559,7 @@ var HtmlHighlightRules = function() {
}, {
token : "meta.tag",
regex : "<(?=\s*style\\b)",
next : "css"
next : "style"
}, {
token : "meta.tag", // opening tag
regex : "<\\/?",
@ -2598,7 +2598,7 @@ var HtmlHighlightRules = function() {
};
xmlUtil.tag(this.$rules, "tag", "start");
xmlUtil.tag(this.$rules, "css", "css-start");
xmlUtil.tag(this.$rules, "style", "css-start");
xmlUtil.tag(this.$rules, "script", "js-start");
this.embedRules(JavaScriptHighlightRules, "js-", [{

View file

@ -1589,7 +1589,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -1597,7 +1597,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -1646,17 +1646,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",
@ -2559,7 +2559,7 @@ var HtmlHighlightRules = function() {
}, {
token : "meta.tag",
regex : "<(?=\s*style\\b)",
next : "css"
next : "style"
}, {
token : "meta.tag", // opening tag
regex : "<\\/?",
@ -2598,7 +2598,7 @@ var HtmlHighlightRules = function() {
};
xmlUtil.tag(this.$rules, "tag", "start");
xmlUtil.tag(this.$rules, "css", "css-start");
xmlUtil.tag(this.$rules, "style", "css-start");
xmlUtil.tag(this.$rules, "script", "js-start");
this.embedRules(JavaScriptHighlightRules, "js-", [{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -302,7 +302,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -310,7 +310,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -359,17 +359,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",

View file

@ -302,7 +302,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -310,7 +310,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -359,17 +359,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -224,7 +224,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -232,7 +232,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -281,17 +281,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",

View file

@ -224,7 +224,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -232,7 +232,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -281,17 +281,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
ace.define("ace/theme/textmate",["require","exports","module"],function(a,b,c){"use strict",b.isDark=!1,b.cssClass="ace-tm",b.cssText=".ace-tm .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tm .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tm .ace_gutter { background: #e8e8e8; color: #333;}.ace-tm .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tm .ace_fold { background-color: #0000A2;}.ace-tm .ace_text-layer { cursor: text;}.ace-tm .ace_cursor { border-left: 2px solid black;}.ace-tm .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-tm .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-tm .ace_line .ace_keyword { color: blue;}.ace-tm .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-tm .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-tm .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-tm .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-tm .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_support.ace_type,.ace-tm .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-tm .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-tm .ace_line .ace_string { color: rgb(3, 106, 7);}.ace-tm .ace_line .ace_comment { color: rgb(76, 136, 107);}.ace-tm .ace_line .ace_comment.ace_doc { color: rgb(0, 102, 255);}.ace-tm .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191);}.ace-tm .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-tm .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-tm .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-tm .ace_markup.ace_markupine { text-decoration:underline;}.ace-tm .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_meta.ace_tag { color:rgb(28, 2, 255);}.ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0)}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}()
ace.define("ace/theme/textmate",["require","exports","module"],function(a,b,c){"use strict",b.isDark=!1,b.cssClass="ace-tm",b.cssText=".ace-tm .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tm .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tm .ace_gutter { background: #e8e8e8; color: #333;}.ace-tm .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tm .ace_fold { background-color: #6B72E6;}.ace-tm .ace_text-layer { cursor: text;}.ace-tm .ace_cursor { border-left: 2px solid black;}.ace-tm .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-tm .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-tm .ace_line .ace_keyword { color: blue;}.ace-tm .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-tm .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-tm .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-tm .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-tm .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_support.ace_type,.ace-tm .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-tm .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-tm .ace_line .ace_string { color: rgb(3, 106, 7);}.ace-tm .ace_line .ace_comment { color: rgb(76, 136, 107);}.ace-tm .ace_line .ace_comment.ace_doc { color: rgb(0, 102, 255);}.ace-tm .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191);}.ace-tm .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-tm .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-tm .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-tm .ace_markup.ace_markupine { text-decoration:underline;}.ace-tm .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_meta.ace_tag { color:rgb(28, 2, 255);}.ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0)}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){ace.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}()

View file

@ -59,7 +59,7 @@ exports.cssText = ".ace-tm .ace_editor {\
}\
\
.ace-tm .ace_fold {\
background-color: #0000A2;\
background-color: #6B72E6;\
}\
\
.ace-tm .ace_text-layer {\

View file

@ -59,7 +59,7 @@ exports.cssText = ".ace-tm .ace_editor {\
}\
\
.ace-tm .ace_fold {\
background-color: #0000A2;\
background-color: #6B72E6;\
}\
\
.ace-tm .ace_text-layer {\

View file

@ -1 +1 @@
define("ace/theme/textmate",["require","exports","module"],function(a,b,c){"use strict",b.isDark=!1,b.cssClass="ace-tm",b.cssText=".ace-tm .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tm .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tm .ace_gutter { background: #e8e8e8; color: #333;}.ace-tm .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tm .ace_fold { background-color: #0000A2;}.ace-tm .ace_text-layer { cursor: text;}.ace-tm .ace_cursor { border-left: 2px solid black;}.ace-tm .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-tm .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-tm .ace_line .ace_keyword { color: blue;}.ace-tm .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-tm .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-tm .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-tm .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-tm .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_support.ace_type,.ace-tm .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-tm .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-tm .ace_line .ace_string { color: rgb(3, 106, 7);}.ace-tm .ace_line .ace_comment { color: rgb(76, 136, 107);}.ace-tm .ace_line .ace_comment.ace_doc { color: rgb(0, 102, 255);}.ace-tm .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191);}.ace-tm .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-tm .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-tm .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-tm .ace_markup.ace_markupine { text-decoration:underline;}.ace-tm .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_meta.ace_tag { color:rgb(28, 2, 255);}.ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0)}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}()
define("ace/theme/textmate",["require","exports","module"],function(a,b,c){"use strict",b.isDark=!1,b.cssClass="ace-tm",b.cssText=".ace-tm .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-tm .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-tm .ace_gutter { background: #e8e8e8; color: #333;}.ace-tm .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-tm .ace_fold { background-color: #6B72E6;}.ace-tm .ace_text-layer { cursor: text;}.ace-tm .ace_cursor { border-left: 2px solid black;}.ace-tm .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-tm .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-tm .ace_line .ace_keyword { color: blue;}.ace-tm .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-tm .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-tm .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-tm .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-tm .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_support.ace_type,.ace-tm .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-tm .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-tm .ace_line .ace_string { color: rgb(3, 106, 7);}.ace-tm .ace_line .ace_comment { color: rgb(76, 136, 107);}.ace-tm .ace_line .ace_comment.ace_doc { color: rgb(0, 102, 255);}.ace-tm .ace_line .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191);}.ace-tm .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-tm .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-tm .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-tm .ace_markup.ace_markupine { text-decoration:underline;}.ace-tm .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-tm .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_meta.ace_tag { color:rgb(28, 2, 255);}.ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0)}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),function(){window.require(["ace/ace"],function(a){window.ace||(window.ace={});for(var b in a)a.hasOwnProperty(b)&&(ace[b]=a[b])})}()

View file

@ -12228,7 +12228,9 @@ var VirtualRenderer = function(container, theme) {
this.scrollLeft = 0;
event.addListener(this.scroller, "scroll", function() {
_self.session.setScrollLeft(_self.scroller.scrollLeft);
var scrollLeft = _self.scroller.scrollLeft;
_self.scrollLeft = scrollLeft;
_self.session.setScrollLeft(scrollLeft);
});
this.cursorPos = {
@ -12527,7 +12529,7 @@ var VirtualRenderer = function(container, theme) {
};
this.$renderChanges = function(changes) {
if (!changes || !this.session)
if (!changes || !this.session || !this.container.offsetWidth)
return;
// text, scrolling and resize changes can cause the view port size to change
@ -12539,20 +12541,33 @@ var VirtualRenderer = function(container, theme) {
)
this.$computeLayerConfig();
// horizontal scrolling
if (changes & this.CHANGE_H_SCROLL) {
this.scroller.scrollLeft = this.scrollLeft;
// read the value after writing it since the value might get clipped
var scrollLeft = this.scroller.scrollLeft;
this.scrollLeft = scrollLeft;
this.session.setScrollLeft(scrollLeft);
}
// full
if (changes & this.CHANGE_FULL) {
this.$textLayer.checkForSizeChanges();
// update scrollbar first to not lose scroll position when gutter calls resize
this.$updateScrollBar();
this.$textLayer.update(this.layerConfig);
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
this.$markerBack.update(this.layerConfig);
this.$markerFront.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar();
return;
}
// scrolling
if (changes & this.CHANGE_SCROLL) {
this.$updateScrollBar();
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
this.$textLayer.update(this.layerConfig);
else
@ -12563,7 +12578,6 @@ var VirtualRenderer = function(container, theme) {
this.$markerBack.update(this.layerConfig);
this.$markerFront.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar();
return;
}
@ -12573,10 +12587,11 @@ var VirtualRenderer = function(container, theme) {
this.$gutterLayer.update(this.layerConfig);
}
else if (changes & this.CHANGE_LINES) {
this.$updateLines();
this.$updateScrollBar();
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
if (this.$updateLines()) {
this.$updateScrollBar();
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
}
} else if (changes & this.CHANGE_GUTTER) {
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
@ -12595,11 +12610,6 @@ var VirtualRenderer = function(container, theme) {
if (changes & this.CHANGE_SIZE)
this.$updateScrollBar();
if (changes & this.CHANGE_H_SCROLL) {
//this.content.style.left = -this.scrollLeft + "px";
this.scroller.scrollLeft = this.scrollLeft
}
};
this.$computeLayerConfig = function() {
@ -12613,9 +12623,13 @@ var VirtualRenderer = function(container, theme) {
var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
var horizScrollChanged = this.$horizScroll !== horizScroll;
this.$horizScroll = horizScroll;
if (horizScrollChanged)
if (horizScrollChanged) {
this.scroller.style.overflowX = horizScroll ? "scroll" : "hidden";
// when we hide scrollbar scroll event isn't emited
// leaving session with wrong scrollLeft value
if (!horizScroll)
this.session.setScrollLeft(0);
}
var maxHeight = this.session.getScreenLength() * this.lineHeight;
this.session.setScrollTop(Math.max(0, Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight)));
@ -12696,6 +12710,7 @@ var VirtualRenderer = function(container, theme) {
// else update only the changed rows
this.$textLayer.updateLines(layerConfig, firstRow, lastRow);
return true;
};
this.$getLongestLine = function() {
@ -12784,7 +12799,7 @@ var VirtualRenderer = function(container, theme) {
};
this.getScrollLeft = function() {
return this.session.getScrollTop();
return this.session.getScrollLeft();
};
this.getScrollTopRow = function() {
@ -12821,10 +12836,9 @@ var VirtualRenderer = function(container, theme) {
if (scrollLeft <= this.$padding)
scrollLeft = 0;
if (this.scrollLeft !== scrollLeft) {
this.$loop.schedule(this.CHANGE_H_SCROLL);
if (this.scrollLeft !== scrollLeft)
this.scrollLeft = scrollLeft;
}
this.$loop.schedule(this.CHANGE_H_SCROLL);
};
this.scrollBy = function(deltaX, deltaY) {
@ -12844,12 +12858,10 @@ var VirtualRenderer = function(container, theme) {
var canvasPos = this.scroller.getBoundingClientRect();
var col = Math.round(
(pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft())
/ this.characterWidth
(pageX + this.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft()) / this.characterWidth
);
var row = Math.floor(
(pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop())
/ this.lineHeight
(pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop()) / this.lineHeight
);
return this.session.screenToDocumentPosition(row, Math.max(col, 0));
@ -13515,6 +13527,11 @@ var Text = function(parentEl) {
}
}
// Size and width can be null if the editor is not visible or
// detached from the document
if (!this.element.offsetWidth)
return null;
var style = this.$measureNode.style;
var computedStyle = dom.computedStyle(this.element);
@ -14289,12 +14306,6 @@ __ace_shadowed__.define("text!ace/css/editor.css", [], "@import url(//fonts.goog
" cursor: text;\n" +
"}\n" +
"\n" +
"/* setting pointer-events: auto; on node under the mouse, which changes during scroll,\n" +
" will break mouse wheel scrolling in Safari */\n" +
".ace_content * {\n" +
" pointer-events: none;\n" +
"}\n" +
"\n" +
".ace_composition {\n" +
" position: absolute;\n" +
" background: #555;\n" +
@ -14302,12 +14313,6 @@ __ace_shadowed__.define("text!ace/css/editor.css", [], "@import url(//fonts.goog
" z-index: 4;\n" +
"}\n" +
"\n" +
".ace_gutter .ace_layer {\n" +
" position: relative;\n" +
" min-width: 54px;\n" +
" text-align: right;\n" +
"}\n" +
"\n" +
".ace_gutter {\n" +
" position: absolute;\n" +
" overflow : hidden;\n" +
@ -14392,6 +14397,16 @@ __ace_shadowed__.define("text!ace/css/editor.css", [], "@import url(//fonts.goog
" box-sizing: border-box;\n" +
" -moz-box-sizing: border-box;\n" +
" -webkit-box-sizing: border-box;\n" +
" /* setting pointer-events: auto; on node under the mouse, which changes\n" +
" during scroll, will break mouse wheel scrolling in Safari */\n" +
" pointer-events: none;\n" +
"}\n" +
"\n" +
".ace_gutter .ace_layer {\n" +
" position: relative;\n" +
" min-width: 40px;\n" +
" text-align: right;\n" +
" pointer-events: auto;\n" +
"}\n" +
"\n" +
".ace_text-layer {\n" +
@ -14489,7 +14504,7 @@ __ace_shadowed__.define("text!ace/css/editor.css", [], "@import url(//fonts.goog
" cursor: move;\n" +
"}\n" +
"\n" +
".ace_folding-enabled .ace_gutter-cell {\n" +
".ace_folding-enabled > .ace_gutter-cell {\n" +
" padding-right: 13px;\n" +
"}\n" +
"\n" +
@ -14609,7 +14624,7 @@ exports.cssText = ".ace-tm .ace_editor {\
}\
\
.ace-tm .ace_fold {\
background-color: #0000A2;\
background-color: #6B72E6;\
}\
\
.ace-tm .ace_text-layer {\

View file

@ -295,7 +295,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -303,7 +303,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -352,17 +352,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",
@ -2468,7 +2468,7 @@ var ColdfusionHighlightRules = function() {
}, {
token : "meta.tag",
regex : "<(?=\s*style)",
next : "css"
next : "style"
}, {
token : "meta.tag", // opening tag
regex : "<\\/?",
@ -2507,7 +2507,7 @@ var ColdfusionHighlightRules = function() {
};
xml_util.tag(this.$rules, "tag", "start");
xml_util.tag(this.$rules, "css", "css-start");
xml_util.tag(this.$rules, "style", "css-start");
xml_util.tag(this.$rules, "script", "js-start");
this.embedRules(JavaScriptHighlightRules, "js-", [{

View file

@ -1813,7 +1813,7 @@ var HtmlHighlightRules = function() {
}, {
token : "meta.tag",
regex : "<(?=\s*style\\b)",
next : "css"
next : "style"
}, {
token : "meta.tag", // opening tag
regex : "<\\/?",
@ -1852,7 +1852,7 @@ var HtmlHighlightRules = function() {
};
xmlUtil.tag(this.$rules, "tag", "start");
xmlUtil.tag(this.$rules, "css", "css-start");
xmlUtil.tag(this.$rules, "style", "css-start");
xmlUtil.tag(this.$rules, "script", "js-start");
this.embedRules(JavaScriptHighlightRules, "js-", [{
@ -1934,7 +1934,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -1942,7 +1942,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -1991,17 +1991,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",

View file

@ -1589,7 +1589,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -1597,7 +1597,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -1646,17 +1646,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",
@ -2559,7 +2559,7 @@ var HtmlHighlightRules = function() {
}, {
token : "meta.tag",
regex : "<(?=\s*style\\b)",
next : "css"
next : "style"
}, {
token : "meta.tag", // opening tag
regex : "<\\/?",
@ -2598,7 +2598,7 @@ var HtmlHighlightRules = function() {
};
xmlUtil.tag(this.$rules, "tag", "start");
xmlUtil.tag(this.$rules, "css", "css-start");
xmlUtil.tag(this.$rules, "style", "css-start");
xmlUtil.tag(this.$rules, "script", "js-start");
this.embedRules(JavaScriptHighlightRules, "js-", [{

View file

@ -302,7 +302,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -310,7 +310,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -359,17 +359,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",

View file

@ -224,7 +224,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : '["].*',
next : state + "-qqstring"
next : state + "_qqstring"
}, {
token : "string",
regex : "'.*?'"
@ -232,7 +232,7 @@ function string(state) {
token : "string", // multi line string start
merge : true,
regex : "['].*",
next : state + "-qstring"
next : state + "_qstring"
}];
}
@ -281,17 +281,17 @@ exports.tag = function(states, name, nextState) {
},
merge : true,
regex : "[-_a-zA-Z0-9:!]+",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}, {
token: "empty",
regex: "",
next : name + "embed-attribute-list"
next : name + "_embed_attribute_list"
}];
states[name + "-qstring"] = multiLineString("'", name + "embed-attribute-list");
states[name + "-qqstring"] = multiLineString("\"", name + "embed-attribute-list");
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
states[name + "embed-attribute-list"] = [{
states[name + "_embed_attribute_list"] = [{
token : "meta.tag",
merge : true,
regex : "\/?>",

View file

@ -59,7 +59,7 @@ exports.cssText = ".ace-tm .ace_editor {\
}\
\
.ace-tm .ace_fold {\
background-color: #0000A2;\
background-color: #6B72E6;\
}\
\
.ace-tm .ace_text-layer {\

View file

@ -455,9 +455,9 @@ bindDropdown("split", function(value) {
} else {
var newEditor = (sp.getSplits() == 1);
if (value == "below") {
sp.setOriantation(sp.BELOW);
sp.setOrientation(sp.BELOW);
} else {
sp.setOriantation(sp.BESIDE);
sp.setOrientation(sp.BESIDE);
}
sp.setSplits(2);

View file

@ -22,12 +22,6 @@
cursor: text;
}
/* setting pointer-events: auto; on node under the mouse, which changes during scroll,
will break mouse wheel scrolling in Safari */
.ace_content * {
pointer-events: none;
}
.ace_composition {
position: absolute;
background: #555;
@ -35,12 +29,6 @@
z-index: 4;
}
.ace_gutter .ace_layer {
position: relative;
min-width: 54px;
text-align: right;
}
.ace_gutter {
position: absolute;
overflow : hidden;
@ -125,6 +113,16 @@
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
/* setting pointer-events: auto; on node under the mouse, which changes
during scroll, will break mouse wheel scrolling in Safari */
pointer-events: none;
}
.ace_gutter .ace_layer {
position: relative;
min-width: 40px;
text-align: right;
pointer-events: auto;
}
.ace_text-layer {
@ -222,7 +220,7 @@
cursor: move;
}
.ace_folding-enabled .ace_gutter-cell {
.ace_folding-enabled > .ace_gutter-cell {
padding-right: 13px;
}

View file

@ -132,6 +132,11 @@ var Text = function(parentEl) {
}
}
// Size and width can be null if the editor is not visible or
// detached from the document
if (!this.element.offsetWidth)
return null;
var style = this.$measureNode.style;
var computedStyle = dom.computedStyle(this.element);

View file

@ -59,7 +59,7 @@ exports.cssText = ".ace-tm .ace_editor {\
}\
\
.ace-tm .ace_fold {\
background-color: #0000A2;\
background-color: #6B72E6;\
}\
\
.ace-tm .ace_text-layer {\

View file

@ -126,7 +126,9 @@ var VirtualRenderer = function(container, theme) {
this.scrollLeft = 0;
event.addListener(this.scroller, "scroll", function() {
_self.session.setScrollLeft(_self.scroller.scrollLeft);
var scrollLeft = _self.scroller.scrollLeft;
_self.scrollLeft = scrollLeft;
_self.session.setScrollLeft(scrollLeft);
});
this.cursorPos = {
@ -560,7 +562,7 @@ var VirtualRenderer = function(container, theme) {
};
this.$renderChanges = function(changes) {
if (!changes || !this.session)
if (!changes || !this.session || !this.container.offsetWidth)
return;
// text, scrolling and resize changes can cause the view port size to change
@ -572,20 +574,33 @@ var VirtualRenderer = function(container, theme) {
)
this.$computeLayerConfig();
// horizontal scrolling
if (changes & this.CHANGE_H_SCROLL) {
this.scroller.scrollLeft = this.scrollLeft;
// read the value after writing it since the value might get clipped
var scrollLeft = this.scroller.scrollLeft;
this.scrollLeft = scrollLeft;
this.session.setScrollLeft(scrollLeft);
}
// full
if (changes & this.CHANGE_FULL) {
this.$textLayer.checkForSizeChanges();
// update scrollbar first to not lose scroll position when gutter calls resize
this.$updateScrollBar();
this.$textLayer.update(this.layerConfig);
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
this.$markerBack.update(this.layerConfig);
this.$markerFront.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar();
return;
}
// scrolling
if (changes & this.CHANGE_SCROLL) {
this.$updateScrollBar();
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
this.$textLayer.update(this.layerConfig);
else
@ -596,7 +611,6 @@ var VirtualRenderer = function(container, theme) {
this.$markerBack.update(this.layerConfig);
this.$markerFront.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar();
return;
}
@ -606,10 +620,11 @@ var VirtualRenderer = function(container, theme) {
this.$gutterLayer.update(this.layerConfig);
}
else if (changes & this.CHANGE_LINES) {
this.$updateLines();
this.$updateScrollBar();
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
if (this.$updateLines()) {
this.$updateScrollBar();
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
}
} else if (changes & this.CHANGE_GUTTER) {
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
@ -628,11 +643,6 @@ var VirtualRenderer = function(container, theme) {
if (changes & this.CHANGE_SIZE)
this.$updateScrollBar();
if (changes & this.CHANGE_H_SCROLL) {
//this.content.style.left = -this.scrollLeft + "px";
this.scroller.scrollLeft = this.scrollLeft
}
};
this.$computeLayerConfig = function() {
@ -646,9 +656,13 @@ var VirtualRenderer = function(container, theme) {
var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
var horizScrollChanged = this.$horizScroll !== horizScroll;
this.$horizScroll = horizScroll;
if (horizScrollChanged)
if (horizScrollChanged) {
this.scroller.style.overflowX = horizScroll ? "scroll" : "hidden";
// when we hide scrollbar scroll event isn't emited
// leaving session with wrong scrollLeft value
if (!horizScroll)
this.session.setScrollLeft(0);
}
var maxHeight = this.session.getScreenLength() * this.lineHeight;
this.session.setScrollTop(Math.max(0, Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight)));
@ -729,6 +743,7 @@ var VirtualRenderer = function(container, theme) {
// else update only the changed rows
this.$textLayer.updateLines(layerConfig, firstRow, lastRow);
return true;
};
this.$getLongestLine = function() {
@ -883,7 +898,7 @@ var VirtualRenderer = function(container, theme) {
* (~EditSession.getScrollLeft)
**/
this.getScrollLeft = function() {
return this.session.getScrollTop();
return this.session.getScrollLeft();
};
/**
@ -958,10 +973,9 @@ var VirtualRenderer = function(container, theme) {
if (scrollLeft <= this.$padding)
scrollLeft = 0;
if (this.scrollLeft !== scrollLeft) {
this.$loop.schedule(this.CHANGE_H_SCROLL);
if (this.scrollLeft !== scrollLeft)
this.scrollLeft = scrollLeft;
}
this.$loop.schedule(this.CHANGE_H_SCROLL);
};
/**

View file

@ -18,9 +18,9 @@
"jsdom": "0.2.x",
"amd-loader": ">=0.0.3",
"libxml": "0.0.x",
"dryice": ">=0.3.1"
"dryice": ">=0.3.1 <0.4"
},
"licenses": [{
"type": "MPL",
"url": "http://www.mozilla.org/MPL/"

View file

@ -5,7 +5,7 @@ var http = require("http"),
path = require("path"),
fs = require("fs"),
mime = require("mime"),
port = process.env.C9_PORT || 8888;
port = process.env.PORT || 8888;
http.createServer(function(request, response) {