tabs to spaces

This commit is contained in:
nightwing 2011-10-04 23:20:05 +05:00
commit b99710cd9e
2 changed files with 31 additions and 31 deletions

View file

@ -661,11 +661,11 @@ var Editor =function(renderer, session) {
return; return;
if (this.selection.isEmpty()){ if (this.selection.isEmpty()){
if(dir == "left") if(dir == "left")
this.selection.selectLeft(); this.selection.selectLeft();
else else
this.selection.selectRight(); this.selection.selectRight();
} }
var range = this.getSelectionRange(); var range = this.getSelectionRange();
if (this.getBehavioursEnabled()) { if (this.getBehavioursEnabled()) {
@ -673,7 +673,7 @@ var Editor =function(renderer, session) {
var state = session.getState(range.start.row); var state = session.getState(range.start.row);
var new_range = session.getMode().transformAction(state, 'deletion', this, session, range); var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);
if (new_range === false) if (new_range === false)
return; return;
if (new_range) if (new_range)
range = new_range; range = new_range;
} }

View file

@ -139,8 +139,8 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) {
this._dispatchEvent("terminate", {}); this._dispatchEvent("terminate", {});
this.$worker.terminate(); this.$worker.terminate();
this.$worker = null; this.$worker = null;
this.$doc.removeEventListener("change", this.changeListener); this.$doc.removeEventListener("change", this.changeListener);
this.$doc = null; this.$doc = null;
}; };
this.send = function(cmd, args) { this.send = function(cmd, args) {
@ -165,22 +165,22 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) {
catch(ex) {} catch(ex) {}
}; };
this.attachToDocument = function(doc) { this.attachToDocument = function(doc) {
if(this.$doc) if(this.$doc)
this.terminate(); this.terminate();
this.$doc = doc; this.$doc = doc;
this.call("setValue", [doc.getValue()]); this.call("setValue", [doc.getValue()]);
doc.on("change", this.changeListener); doc.on("change", this.changeListener);
}; };
this.changeListener = function(e) { this.changeListener = function(e) {
e.range = { e.range = {
start: e.data.range.start, start: e.data.range.start,
end: e.data.range.end end: e.data.range.end
}; };
this.emit("change", e); this.emit("change", e);
}; };
}).call(WorkerClient.prototype); }).call(WorkerClient.prototype);