From b99710cd9e739712c4082ed055cea0388abea2ec Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 4 Oct 2011 23:20:05 +0500 Subject: [PATCH] tabs to spaces --- lib/ace/editor.js | 20 ++++++++-------- lib/ace/worker/worker_client.js | 42 ++++++++++++++++----------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/lib/ace/editor.js b/lib/ace/editor.js index c98086a2..5844c424 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -230,7 +230,7 @@ var Editor =function(renderer, session) { this.unsetStyle = function(style) { this.renderer.unsetStyle(style); }; - + this.setFontSize = function(size) { this.container.style.fontSize = size; }; @@ -269,7 +269,7 @@ var Editor =function(renderer, session) { }); this.textInput.focus(); }; - + this.isFocused = function() { return this.textInput.isFocused(); }; @@ -407,7 +407,7 @@ var Editor =function(renderer, session) { var text = ""; if (!this.selection.isEmpty()) text = this.session.getTextRange(this.getSelectionRange()); - + this._emit("copy", text); return text; }; @@ -523,7 +523,7 @@ var Editor =function(renderer, session) { this.onTextInput = function(text, notPasted) { if (!notPasted) this._emit("paste", text); - + // In case the text was not pasted and we got only one character, then // handel it as a command key stroke. if (notPasted && text.length == 1) { @@ -661,11 +661,11 @@ var Editor =function(renderer, session) { return; if (this.selection.isEmpty()){ - if(dir == "left") - this.selection.selectLeft(); - else - this.selection.selectRight(); - } + if(dir == "left") + this.selection.selectLeft(); + else + this.selection.selectRight(); + } var range = this.getSelectionRange(); if (this.getBehavioursEnabled()) { @@ -673,7 +673,7 @@ var Editor =function(renderer, session) { var state = session.getState(range.start.row); var new_range = session.getMode().transformAction(state, 'deletion', this, session, range); if (new_range === false) - return; + return; if (new_range) range = new_range; } diff --git a/lib/ace/worker/worker_client.js b/lib/ace/worker/worker_client.js index a58b7c6e..97be387d 100644 --- a/lib/ace/worker/worker_client.js +++ b/lib/ace/worker/worker_client.js @@ -104,9 +104,9 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) { this.$normalizePath = function(path) { if (!path.match(/^\w+:/)) { - path = location.protocol + "//" + location.host + path = location.protocol + "//" + location.host // paths starting with a slash are relative to the root (host) - + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, "")) + + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, "")) + "/" + path.replace(/^[\/]+/, ""); } return path; @@ -115,7 +115,7 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) { this.$guessBasePath = function() { if (require.aceBaseUrl) return require.aceBaseUrl; - + var scripts = document.getElementsByTagName("script"); for (var i=0; i