Merge branch 'master' of github.com:ajaxorg/ace

This commit is contained in:
Garen Torikian 2012-08-28 16:08:39 -07:00
commit 65dccaca8d
3 changed files with 14 additions and 13 deletions

View file

@ -260,15 +260,15 @@
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
margin: 0 -12px 1px 1px;
margin: 0 -12px 0 1px;
display: inline-block;
height: 14px;
height: 100%;
width: 11px;
vertical-align: text-bottom;
vertical-align: bottom;
background-image: url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82");
background-repeat: no-repeat;
background-position: center 4px;
background-position: center;
border-radius: 3px;
@ -289,7 +289,6 @@
-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
background-position: center 4px;
}
.ace_fold-widget:active {

View file

@ -93,11 +93,11 @@ var Gutter = function(parentEl) {
rowInfo.text.push(annoText);
var type = annotation.type;
if (type == "error")
rowInfo.className = "ace_error";
else if (type == "warning" && rowInfo.className != "ace_error")
rowInfo.className = "ace_warning";
rowInfo.className = " ace_error";
else if (type == "warning" && rowInfo.className != " ace_error")
rowInfo.className = " ace_warning";
else if (type == "info" && (!rowInfo.className))
rowInfo.className = "ace_info";
rowInfo.className = " ace_info";
}
}
};
@ -112,6 +112,7 @@ var Gutter = function(parentEl) {
var foldWidgets = this.$showFoldWidgets && this.session.foldWidgets;
var breakpoints = this.session.$breakpoints;
var decorations = this.session.$decorations;
var lastLineNumber = 0;
while (true) {
if(i > foldStart) {
@ -127,7 +128,7 @@ var Gutter = function(parentEl) {
"<div class='ace_gutter-cell ",
breakpoints[i] || "", decorations[i] || "", annotation.className,
"' style='height:", this.session.getRowLength(i) * config.lineHeight, "px;'>",
i + 1
lastLineNumber = i + 1
);
if (foldWidgets) {
@ -152,13 +153,14 @@ var Gutter = function(parentEl) {
this.element.style.height = config.minHeight + "px";
if (this.session.$useWrapMode)
i = this.session.getLength();
lastLineNumber = this.session.getLength();
var gutterWidth = ("" + --i).length * config.characterWidth;
var gutterWidth = ("" + lastLineNumber).length * config.characterWidth;
var padding = this.$padding || this.$computePadding();
gutterWidth += padding.left + padding.right;
if (gutterWidth !== this.gutterWidth) {
this.gutterWidth = gutterWidth;
this.element.style.width = Math.ceil(this.gutterWidth) + "px";
this._emit("changeGutterWidth", gutterWidth);
}
};

View file

@ -13,7 +13,7 @@ define(function(require, exports, module) {
);
var buildinConstants = lang.arrayToMap(
("nit|true|false|iota").split("|")
("nil|true|false|iota").split("|")
);
this.$rules = {