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

This commit is contained in:
Garen Torikian 2012-08-24 11:14:40 -07:00
commit 55d57fd30d
6 changed files with 560 additions and 15 deletions

View file

@ -131,7 +131,6 @@
.ace_gutter .ace_layer {
position: relative;
min-width: 40px;
width: auto;
text-align: right;
pointer-events: auto;

View file

@ -148,17 +148,15 @@ var Gutter = function(parentEl) {
i++;
}
if (this.session.$useWrapMode)
html.push(
"<div class='ace_gutter-cell' style='pointer-events:none;opacity:0'>",
this.session.getLength() - 1,
"</div>"
);
this.element = dom.setInnerHtml(this.element, html.join(""));
this.element.style.height = config.minHeight + "px";
var gutterWidth = this.element.offsetWidth;
if (this.session.$useWrapMode)
i = this.session.getLength();
var gutterWidth = ("" + --i).length * config.characterWidth;
var padding = this.$padding || this.$computePadding();
gutterWidth += padding.left + padding.right;
if (gutterWidth !== this.gutterWidth) {
this.gutterWidth = gutterWidth;
this._emit("changeGutterWidth", gutterWidth);

View file

@ -735,12 +735,10 @@ var VirtualRenderer = function(container, theme) {
this.$gutterLayer.update(this.layerConfig);
}
else if (changes & this.CHANGE_LINES) {
if (this.$updateLines()) {
this.$updateScrollBar();
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
}
} else if (changes & this.CHANGE_GUTTER) {
if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.showGutter)
this.$gutterLayer.update(this.layerConfig);
}
else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {
if (this.showGutter)
this.$gutterLayer.update(this.layerConfig);
}