Fixed some minor issues and removed some spurious
comments
This commit is contained in:
parent
6d73a44c9a
commit
f222d0e649
5 changed files with 9 additions and 8 deletions
|
|
@ -80,7 +80,7 @@ return {
|
|||
"selectlinestart": "Shift-Home",
|
||||
"selectlineend": "Shift-End",
|
||||
"del": "Delete",
|
||||
"backspace": "Backspace",
|
||||
"backspace": "Ctrl-Backspace|Command-Backspace|Option-Backspace|Backspace",
|
||||
"outdent": "Shift-Tab",
|
||||
"indent": "Tab"
|
||||
};
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ var Text = function(parentEl) {
|
|||
this.updateLines = function(layerConfig, firstRow, lastRow) {
|
||||
this.$computeTabString();
|
||||
this.config = layerConfig;
|
||||
|
||||
|
||||
var first = Math.max(firstRow, layerConfig.firstRow);
|
||||
var last = Math.min(lastRow, layerConfig.lastRow);
|
||||
|
||||
|
|
|
|||
|
|
@ -48,16 +48,17 @@ var RenderLoop = function(onRender) {
|
|||
(function() {
|
||||
|
||||
this.schedule = function(change) {
|
||||
// this.onRender(change);
|
||||
// return;
|
||||
//this.onRender(change);
|
||||
//return;
|
||||
this.changes = this.changes | change;
|
||||
if (!this.pending) {
|
||||
this.pending = true;
|
||||
var _self = this;
|
||||
this.setTimeoutZero(function() {
|
||||
_self.pending = false;
|
||||
_self.onRender(_self.changes);
|
||||
var changes = _self.changes;
|
||||
_self.changes = 0;
|
||||
_self.onRender(changes);
|
||||
})
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ var ScrollBar = function(parent) {
|
|||
oop.implement(this, MEventEmitter);
|
||||
|
||||
this.onScroll = function() {
|
||||
this.$dispatchEvent("scroll", {data: this.element.scrollTop});
|
||||
this.$dispatchEvent("scroll", {data: this.element.scrollTop});
|
||||
};
|
||||
|
||||
this.getWidth = function() {
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$renderChanges = function(changes) {
|
||||
if (!changes || !this.doc || !this.$tokenizer)
|
||||
return;
|
||||
|
||||
|
||||
// text, scrolling and resize changes can cause the view port size to change
|
||||
if (!this.layerConfig ||
|
||||
changes & this.CHANGE_FULL ||
|
||||
|
|
@ -373,7 +373,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
||||
}
|
||||
else if (changes & this.CHANGE_LINES) {
|
||||
this.$updateLines();
|
||||
this.$updateLines();
|
||||
this.$updateScrollBar();
|
||||
} if (changes & this.CHANGE_GUTTER) {
|
||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue