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

This commit is contained in:
Fabian Jakobs 2011-02-03 09:37:53 +01:00
commit 083e29bbf8
6 changed files with 12 additions and 6 deletions

1
.gitignore vendored
View file

@ -7,6 +7,7 @@
.project
.settings/
.settings.xml
.c9settiongs.xml
.settings.xml.old
.*.gz

View file

@ -214,7 +214,7 @@ var EditSession = function(text, mode) {
* }
*/
this.setAnnotations = function(annotations) {
this.$annotations = [];
this.$annotations = {};
for (var i=0; i<annotations.length; i++) {
var annotation = annotations[i];
var row = annotation.row;
@ -231,7 +231,7 @@ var EditSession = function(text, mode) {
};
this.clearAnnotations = function() {
this.$annotations = [];
this.$annotations = {};
this._dispatchEvent("changeAnnotation", {});
};

View file

@ -72,12 +72,15 @@ var Gutter = function(parentEl) {
this.setAnnotations = function(annotations) {
// iterate over sparse array
this.$annotations = [];
this.$annotations = [];
for (var row in annotations) {
var rowAnnotations = annotations[row];
if (!rowAnnotations)
continue;
var rowInfo = this.$annotations[row] = {
text: []
};
var rowAnnotations = annotations[row];
for (var i=0; i<rowAnnotations.length; i++) {
var annotation = rowAnnotations[i];
rowInfo.text.push(annotation.text.replace(/"/g, "&quot;").replace(/'/g, "&rsquo;").replace(/</, "&lt;"));

View file

@ -19,9 +19,10 @@ var require = function(id) {
var chunks = id.split("/");
chunks[0] = require.tlns[chunks[0]] || chunks[0];
path = require.baseUrl + "/" + chunks.join("/") + ".js"
path = /*require.baseUrl + "/" +*/ chunks.join("/") + ".js"
require.id = id;
// console.log("require " + path + " " + id)
importScripts(path);
return require(id);
};

View file

@ -42,6 +42,7 @@ var WorkerClient = function(baseUrl, topLevelNamespaces, packagedJs, module, cla
var _self = this;
this.$worker.onerror = function(e) {
console.log(e);
throw e;
};
this.$worker.onmessage = function(e) {

@ -1 +1 @@
Subproject commit 67a380309e5b139a9603334ad9d9f917659f04bc
Subproject commit c0cab19cbb5d44df98bae0060c782a6f30464afe