This commit is contained in:
Fabian Jakobs 2011-11-25 18:46:50 +01:00
commit ff2a87af7e
12 changed files with 52 additions and 55 deletions

View file

@ -6232,7 +6232,7 @@ var Tokenizer = function(rules) {
} }
break; break;
} }
}; }
if (value[0]) { if (value[0]) {
if (typeof type == "string") { if (typeof type == "string") {
@ -6250,7 +6250,7 @@ var Tokenizer = function(rules) {
token = { token = {
type: type[i], type: type[i],
value: value[i] value: value[i]
} };
} }
} }
} }
@ -6259,7 +6259,7 @@ var Tokenizer = function(rules) {
break; break;
lastIndex = re.lastIndex; lastIndex = re.lastIndex;
}; }
if (token.type) if (token.type)
tokens.push(token); tokens.push(token);
@ -14213,7 +14213,7 @@ var XmlHighlightRules = function() {
}, { }, {
token : "string", // multi line string start token : "string", // multi line string start
merge : true, merge : true,
regex : '["].*$', regex : '["].*',
next : "qqstring" next : "qqstring"
}, { }, {
token : "string", token : "string",
@ -14221,13 +14221,13 @@ var XmlHighlightRules = function() {
}, { }, {
token : "string", // multi line string start token : "string", // multi line string start
merge : true, merge : true,
regex : "['].*$", regex : "['].*",
next : "qstring" next : "qstring"
}], }],
qstring: [{ qstring: [{
token : "string", token : "string",
regex : ".*'", regex : ".*?'",
next : "tag" next : "tag"
}, { }, {
token : "string", token : "string",
@ -14237,7 +14237,7 @@ var XmlHighlightRules = function() {
qqstring: [{ qqstring: [{
token : "string", token : "string",
regex : ".*\"", regex : ".*?\"",
next : "tag" next : "tag"
}, { }, {
token : "string", token : "string",

File diff suppressed because one or more lines are too long

View file

@ -11,7 +11,7 @@
Ace Ace
version 0.2.0 version 0.2.0
commit 2b4351ccd7efe07b220e99de11e9b451dc2e478c commit 1a42d8e2b080b6676ff7701ad8b11cd12ed0c1b0
--> -->
@ -189,7 +189,7 @@
<!-- <!--
<script type="text/javascript"> <script type="text/javascript">
var require = { var require = {
baseUrl: "/" + window.location.pathname.split("/").slice(0, -1).join("/"), baseUrl: window.location.protocol + "//" + window.location.host + window.location.pathname.split("/").slice(0, -1).join("/"),
paths: { paths: {
ace: "lib/ace" ace: "lib/ace"
} }

View file

@ -8117,7 +8117,7 @@ var Tokenizer = function(rules) {
} }
break; break;
} }
}; }
if (value[0]) { if (value[0]) {
if (typeof type == "string") { if (typeof type == "string") {
@ -8135,7 +8135,7 @@ var Tokenizer = function(rules) {
token = { token = {
type: type[i], type: type[i],
value: value[i] value: value[i]
} };
} }
} }
} }
@ -8144,7 +8144,7 @@ var Tokenizer = function(rules) {
break; break;
lastIndex = re.lastIndex; lastIndex = re.lastIndex;
}; }
if (token.type) if (token.type)
tokens.push(token); tokens.push(token);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1903,9 +1903,9 @@ exports.addMouseWheelListener = function(el, callback) {
max = Math.abs(e.wheelDeltaY) max = Math.abs(e.wheelDeltaY)
if (max > 5000) if (max > 5000)
factor = 400; var factor = 400;
else else
factor = 8; var factor = 8;
if (e.wheelDeltaX !== undefined) { if (e.wheelDeltaX !== undefined) {
e.wheelX = -e.wheelDeltaX / factor; e.wheelX = -e.wheelDeltaX / factor;
@ -1979,7 +1979,7 @@ function normalizeCommandKeys(callback, e, keyCode) {
break; break;
case "Shift": case "Shift":
hashId = 4; hashId = 4;
break break;
case "Ctrl": case "Ctrl":
hashId = 1; hashId = 1;
break; break;
@ -2041,6 +2041,28 @@ exports.addCommandKeyListener = function(el, callback) {
} }
}; };
if (window.postMessage) {
var postMessageId = 1;
this.nextTick = function(callback, win) {
win = win || window;
var messageName = "zero-timeout-message-" + postMessageId;
exports.addListener(win, "message", function listener(e) {
if (e.data == messageName) {
exports.stopPropagation(e);
exports.removeListener(win, "message", listener);
callback();
}
});
win.postMessage(messageName, "*");
};
}
else {
this.nextTick = function(callback, win) {
win = win || window;
window.setTimeout(callback, 0);
};
}
}); });
/*! @license /*! @license
========================================================================== ==========================================================================
@ -8049,7 +8071,7 @@ var Tokenizer = function(rules) {
} }
break; break;
} }
}; }
if (value[0]) { if (value[0]) {
if (typeof type == "string") { if (typeof type == "string") {
@ -8067,7 +8089,7 @@ var Tokenizer = function(rules) {
token = { token = {
type: type[i], type: type[i],
value: value[i] value: value[i]
} };
} }
} }
} }
@ -8076,7 +8098,7 @@ var Tokenizer = function(rules) {
break; break;
lastIndex = re.lastIndex; lastIndex = re.lastIndex;
}; }
if (token.type) if (token.type)
tokens.push(token); tokens.push(token);
@ -13113,11 +13135,11 @@ __ace_shadowed__.define('ace/renderloop', ['require', 'exports', 'module' , 'ace
var event = require("./lib/event"); var event = require("./lib/event");
var RenderLoop = function(onRender, window) { var RenderLoop = function(onRender, win) {
this.onRender = onRender; this.onRender = onRender;
this.pending = false; this.pending = false;
this.changes = 0; this.changes = 0;
this.setTimeoutZero = this.setTimeoutZero.bind(window); this.window = win || window;
}; };
(function() { (function() {
@ -13129,40 +13151,15 @@ var RenderLoop = function(onRender, window) {
if (!this.pending) { if (!this.pending) {
this.pending = true; this.pending = true;
var _self = this; var _self = this;
this.setTimeoutZero(function() { event.nextTick(function() {
_self.pending = false; _self.pending = false;
var changes = _self.changes; var changes = _self.changes;
_self.changes = 0; _self.changes = 0;
_self.onRender(changes); _self.onRender(changes);
}); }, this.window);
} }
}; };
if (window.postMessage) {
this.setTimeoutZero = (function(messageName, attached, listener) {
return function setTimeoutZero(callback) {
// Set up listener if not listening already.
if (!attached) {
event.addListener(this, "message", function(e) {
if (listener && e.data == messageName) {
event.stopPropagation(e);
listener();
}
});
attached = true;
}
listener = callback;
this.postMessage(messageName, "*");
};
})("zero-timeout-message", false, null);
}
else {
this.setTimeoutZero = function(callback) {
this.setTimeout(callback, 0);
};
}
}).call(RenderLoop.prototype); }).call(RenderLoop.prototype);
exports.RenderLoop = RenderLoop; exports.RenderLoop = RenderLoop;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long