package
This commit is contained in:
parent
dd55f74256
commit
2ca62bca00
39 changed files with 317 additions and 289 deletions
|
|
@ -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-", [{
|
||||
|
|
@ -20973,7 +20973,7 @@ var Split = function(container, theme, splits) {
|
|||
this.$splits = 0;
|
||||
this.$editorCSS = "";
|
||||
this.$editors = [];
|
||||
this.$orientation = this.BESIDE;
|
||||
this.$oriantation = this.BESIDE;
|
||||
|
||||
this.setSplits(splits || 1);
|
||||
this.$cEditor = this.$editors[0];
|
||||
|
|
@ -21130,15 +21130,15 @@ var Split = function(container, theme, splits) {
|
|||
return session;
|
||||
};
|
||||
|
||||
this.getOrientation = function() {
|
||||
return this.$orientation;
|
||||
this.getOriantation = function() {
|
||||
return this.$oriantation;
|
||||
};
|
||||
|
||||
this.setOrientation = function(orientation) {
|
||||
if (this.$orientation == orientation) {
|
||||
this.setOriantation = function(oriantation) {
|
||||
if (this.$oriantation == oriantation) {
|
||||
return;
|
||||
}
|
||||
this.$orientation = orientation;
|
||||
this.$oriantation = oriantation;
|
||||
this.resize();
|
||||
};
|
||||
|
||||
|
|
@ -21147,7 +21147,7 @@ var Split = function(container, theme, splits) {
|
|||
var height = this.$container.clientHeight;
|
||||
var editor;
|
||||
|
||||
if (this.$orientation == this.BESIDE) {
|
||||
if (this.$oriantation == this.BESIDE) {
|
||||
var editorWidth = width / this.$splits;
|
||||
for (var i = 0; i < this.$splits; i++) {
|
||||
editor = this.$editors[i];
|
||||
|
|
@ -24988,20 +24988,27 @@ var VirtualRenderer = function(container, theme) {
|
|||
)
|
||||
this.$computeLayerConfig();
|
||||
|
||||
// horizontal scrolling
|
||||
if (changes & this.CHANGE_H_SCROLL)
|
||||
this.scroller.scrollLeft = this.scrollLeft
|
||||
|
||||
// full
|
||||
if (changes & this.CHANGE_FULL) {
|
||||
this.$textLayer.checkForSizeChanges();
|
||||
// update scrollbar first to not loose 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 +25019,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 +25028,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 +25051,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 +25064,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 +25151,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 +25240,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
};
|
||||
|
||||
this.getScrollLeft = function() {
|
||||
return this.session.getScrollTop();
|
||||
return this.session.getScrollLeft();
|
||||
};
|
||||
|
||||
this.getScrollTopRow = function() {
|
||||
|
|
@ -25293,12 +25300,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 +25969,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 +26748,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 +26755,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 +26839,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 +26946,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" +
|
||||
|
|
|
|||
|
|
@ -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 {\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue