Merge branch 'master' of https://github.com/ajaxorg/ace
Conflicts: lib/ace/scrollbar.js lib/ace/virtual_renderer.js
This commit is contained in:
commit
1e01007990
6 changed files with 10 additions and 9 deletions
|
|
@ -80,7 +80,7 @@ exports.bindings = {
|
||||||
"selectlinestart": "Shift-Home",
|
"selectlinestart": "Shift-Home",
|
||||||
"selectlineend": "Shift-End",
|
"selectlineend": "Shift-End",
|
||||||
"del": "Delete",
|
"del": "Delete",
|
||||||
"backspace": "Backspace",
|
"backspace": "Ctrl-Backspace|Command-Backspace|Option-Backspace|Backspace",
|
||||||
"outdent": "Shift-Tab",
|
"outdent": "Shift-Tab",
|
||||||
"indent": "Tab"
|
"indent": "Tab"
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ var Editor =function(renderer, doc) {
|
||||||
return event.preventDefault(e);
|
return event.preventDefault(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
var mouseTarget = renderer.getMouseEventTarget();
|
var mouseTarget = renderer.getMouseEventTarget();
|
||||||
event.addListener(mouseTarget, "mousedown", lang.bind(this.onMouseDown, this));
|
event.addListener(mouseTarget, "mousedown", lang.bind(this.onMouseDown, this));
|
||||||
event.addMultiMouseDownListener(mouseTarget, 0, 2, 500, lang.bind(this.onMouseDoubleClick, this));
|
event.addMultiMouseDownListener(mouseTarget, 0, 2, 500, lang.bind(this.onMouseDoubleClick, this));
|
||||||
event.addMultiMouseDownListener(mouseTarget, 0, 3, 600, lang.bind(this.onMouseTripleClick, this));
|
event.addMultiMouseDownListener(mouseTarget, 0, 3, 600, lang.bind(this.onMouseTripleClick, this));
|
||||||
|
|
@ -454,7 +454,7 @@ var Editor =function(renderer, doc) {
|
||||||
indent += 1;
|
indent += 1;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
if (/[^\s]$/.test(line))
|
if (/[^\s]/.test(line))
|
||||||
minIndent = Math.min(indent, minIndent);
|
minIndent = Math.min(indent, minIndent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ var Text = function(parentEl) {
|
||||||
this.updateLines = function(layerConfig, firstRow, lastRow) {
|
this.updateLines = function(layerConfig, firstRow, lastRow) {
|
||||||
this.$computeTabString();
|
this.$computeTabString();
|
||||||
this.config = layerConfig;
|
this.config = layerConfig;
|
||||||
|
|
||||||
var first = Math.max(firstRow, layerConfig.firstRow);
|
var first = Math.max(firstRow, layerConfig.firstRow);
|
||||||
var last = Math.min(lastRow, layerConfig.lastRow);
|
var last = Math.min(lastRow, layerConfig.lastRow);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,16 +48,17 @@ var RenderLoop = function(onRender) {
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
this.schedule = function(change) {
|
this.schedule = function(change) {
|
||||||
// this.onRender(change);
|
//this.onRender(change);
|
||||||
// return;
|
//return;
|
||||||
this.changes = this.changes | change;
|
this.changes = this.changes | change;
|
||||||
if (!this.pending) {
|
if (!this.pending) {
|
||||||
this.pending = true;
|
this.pending = true;
|
||||||
var _self = this;
|
var _self = this;
|
||||||
this.setTimeoutZero(function() {
|
this.setTimeoutZero(function() {
|
||||||
_self.pending = false;
|
_self.pending = false;
|
||||||
_self.onRender(_self.changes);
|
var changes = _self.changes;
|
||||||
_self.changes = 0;
|
_self.changes = 0;
|
||||||
|
_self.onRender(changes);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ var ScrollBar = function(parent) {
|
||||||
oop.implement(this, EventEmitter);
|
oop.implement(this, EventEmitter);
|
||||||
|
|
||||||
this.onScroll = function() {
|
this.onScroll = function() {
|
||||||
this._dispatchEvent("scroll", {data: this.element.scrollTop});
|
this.$dispatchEvent("scroll", {data: this.element.scrollTop});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getWidth = function() {
|
this.getWidth = function() {
|
||||||
|
|
|
||||||
|
|
@ -332,7 +332,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$renderChanges = function(changes) {
|
this.$renderChanges = function(changes) {
|
||||||
if (!changes || !this.doc || !this.$tokenizer)
|
if (!changes || !this.doc || !this.$tokenizer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// text, scrolling and resize changes can cause the view port size to change
|
// text, scrolling and resize changes can cause the view port size to change
|
||||||
if (!this.layerConfig ||
|
if (!this.layerConfig ||
|
||||||
changes & this.CHANGE_FULL ||
|
changes & this.CHANGE_FULL ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue