This commit is contained in:
Fabian Jakobs 2011-11-28 17:03:55 +01:00
commit 15f2ef3f80
25 changed files with 81 additions and 82 deletions

View file

@ -2157,7 +2157,7 @@ exports.addMouseWheelListener = function(el, callback) {
// some versions of Safari (e.g. 5.0.5) report insanely high // some versions of Safari (e.g. 5.0.5) report insanely high
// scroll values. These browsers require a higher factor // scroll values. These browsers require a higher factor
if (Math.abs(e.wheelDeltaY) > max) if (Math.abs(e.wheelDeltaY) > max)
max = Math.abs(e.wheelDeltaY) max = Math.abs(e.wheelDeltaY);
if (max > 5000) if (max > 5000)
var factor = 400; var factor = 400;
@ -2300,7 +2300,7 @@ exports.addCommandKeyListener = function(el, callback) {
if (window.postMessage) { if (window.postMessage) {
var postMessageId = 1; var postMessageId = 1;
this.nextTick = function(callback, win) { exports.nextTick = function(callback, win) {
win = win || window; win = win || window;
var messageName = "zero-timeout-message-" + postMessageId; var messageName = "zero-timeout-message-" + postMessageId;
exports.addListener(win, "message", function listener(e) { exports.addListener(win, "message", function listener(e) {
@ -2314,7 +2314,7 @@ if (window.postMessage) {
}; };
} }
else { else {
this.nextTick = function(callback, win) { exports.nextTick = function(callback, win) {
win = win || window; win = win || window;
window.setTimeout(callback, 0); window.setTimeout(callback, 0);
}; };
@ -10669,7 +10669,7 @@ define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' , 'ace
regex : "(?:(?:\\.|::)\\s*)" + identifier regex : "(?:(?:\\.|::)\\s*)" + identifier
}, { }, {
token : "variable", token : "variable",
regex : "@" + identifier regex : "@(?:" + identifier + ")?"
}, { }, {
token: function(value) { token: function(value) {
if (keywords.hasOwnProperty(value)) if (keywords.hasOwnProperty(value))
@ -10733,15 +10733,15 @@ define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' , 'ace
}, { }, {
token : "punctuation.operator", token : "punctuation.operator",
regex : "\\?|\\:|\\,|\\." regex : "\\?|\\:|\\,|\\."
}, {
token : "keyword.operator",
regex : "(?:[\\-=]>|[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|\\!)"
}, { }, {
token : "paren.lparen", token : "paren.lparen",
regex : "[({[]" regex : "[({[]"
}, { }, {
token : "paren.rparen", token : "paren.rparen",
regex : "[\\]})]" regex : "[\\]})]"
}, {
token : "keyword.operator",
regex : "\\S+"
}, { }, {
token : "text", token : "text",
regex : "\\s+" regex : "\\s+"
@ -11131,7 +11131,6 @@ oop.inherits(Mode, TextMode);
this.toggleCommentLines = function(state, doc, startRow, endRow) { this.toggleCommentLines = function(state, doc, startRow, endRow) {
var outdent = true; var outdent = true;
var outentedRows = [];
var re = /^(\s*)\/\//; var re = /^(\s*)\/\//;
for (var i=startRow; i<= endRow; i++) { for (var i=startRow; i<= endRow; i++) {
@ -11170,7 +11169,7 @@ oop.inherits(Mode, TextMode);
} }
if (state == "start" || state == "regex_allowed") { if (state == "start" || state == "regex_allowed") {
var match = line.match(/^.*[\{\(\[\:]\s*$/); var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
if (match) { if (match) {
indent += tab; indent += tab;
} }
@ -20840,7 +20839,7 @@ var TextInput = function(parentNode, host) {
clipboardData.setData("Text", copyText); clipboardData.setData("Text", copyText);
host.onCut(); host.onCut();
} }
event.preventDefault(e) event.preventDefault(e);
} }
}); });
} }
@ -20852,10 +20851,10 @@ var TextInput = function(parentNode, host) {
event.addListener(text, "compositionstart", onCompositionStart); event.addListener(text, "compositionstart", onCompositionStart);
if (useragent.isGecko) { if (useragent.isGecko) {
event.addListener(text, "text", onCompositionUpdate); event.addListener(text, "text", onCompositionUpdate);
}; }
if (useragent.isWebKit) { if (useragent.isWebKit) {
event.addListener(text, "keyup", onCompositionUpdate); event.addListener(text, "keyup", onCompositionUpdate);
}; }
event.addListener(text, "compositionend", onCompositionEnd); event.addListener(text, "compositionend", onCompositionEnd);
event.addListener(text, "blur", function() { event.addListener(text, "blur", function() {
@ -20879,7 +20878,7 @@ var TextInput = function(parentNode, host) {
function isFocused() { function isFocused() {
return document.activeElement === text; return document.activeElement === text;
}; }
this.isFocused = isFocused; this.isFocused = isFocused;
this.getElement = function() { this.getElement = function() {
@ -20893,12 +20892,12 @@ var TextInput = function(parentNode, host) {
text.style.cssText = text.style.cssText =
'position:fixed; z-index:1000;' + 'position:fixed; z-index:1000;' +
'left:' + (mousePos.x - 2) + 'px; top:' + (mousePos.y - 2) + 'px;' 'left:' + (mousePos.x - 2) + 'px; top:' + (mousePos.y - 2) + 'px;';
} }
if (isEmpty) if (isEmpty)
text.value=''; text.value='';
} };
this.onContextMenuClose = function(){ this.onContextMenuClose = function(){
setTimeout(function () { setTimeout(function () {
@ -20908,7 +20907,7 @@ var TextInput = function(parentNode, host) {
} }
sendText(); sendText();
}, 0); }, 0);
} };
}; };
exports.TextInput = TextInput; exports.TextInput = TextInput;
@ -21611,9 +21610,8 @@ var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
define('ace/keyboard/keybinding', ['require', 'exports', 'module' , 'ace/lib/useragent', 'ace/lib/keys', 'ace/lib/event', 'ace/commands/default_commands'], function(require, exports, module) { define('ace/keyboard/keybinding', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/event', 'ace/commands/default_commands'], function(require, exports, module) {
var useragent = require("../lib/useragent");
var keyUtil = require("../lib/keys"); var keyUtil = require("../lib/keys");
var event = require("../lib/event"); var event = require("../lib/event");
require("../commands/default_commands"); require("../commands/default_commands");
@ -21650,8 +21648,9 @@ var KeyBinding = function(editor) {
}; };
this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) { this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {
var toExecute;
for (var i = this.$handlers.length; i--;) { for (var i = this.$handlers.length; i--;) {
var toExecute = this.$handlers[i].handleKeyboard( toExecute = this.$handlers[i].handleKeyboard(
this.$data, hashId, keyString, keyCode, e this.$data, hashId, keyString, keyCode, e
); );
if (toExecute && toExecute.command) if (toExecute && toExecute.command)
@ -21671,13 +21670,13 @@ var KeyBinding = function(editor) {
if (success && e) if (success && e)
event.stopEvent(e); event.stopEvent(e);
return success return success;
}; };
this.handleKeyboard = function(data, hashId, keyString) { this.handleKeyboard = function(data, hashId, keyString) {
return { return {
command: this.$editor.commands.findKeyCommand(hashId, keyString) command: this.$editor.commands.findKeyCommand(hashId, keyString)
} };
}; };
this.onCommandKey = function(e, hashId, keyCode) { this.onCommandKey = function(e, hashId, keyCode) {
@ -21953,12 +21952,12 @@ exports.commands = [{
readOnly: true readOnly: true
}, { }, {
name: "togglerecording", name: "togglerecording",
bindKey: bindKey("Ctrl-Shift-E", "Ctrl-Shift-E"), bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"),
exec: function(editor) { editor.commands.toggleRecording(); }, exec: function(editor) { editor.commands.toggleRecording(); },
readOnly: true readOnly: true
}, { }, {
name: "replaymacro", name: "replaymacro",
bindKey: bindKey("Ctrl-E", "Ctrl-E"), bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"),
exec: function(editor) { editor.commands.replay(editor); }, exec: function(editor) { editor.commands.replay(editor); },
readOnly: true readOnly: true
}, },

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 1a42d8e2b080b6676ff7701ad8b11cd12ed0c1b0 commit 12f47849fb89e143e4968e6b4d3e6aeecd7d5087
--> -->

View file

@ -1946,7 +1946,7 @@ exports.addMouseWheelListener = function(el, callback) {
// some versions of Safari (e.g. 5.0.5) report insanely high // some versions of Safari (e.g. 5.0.5) report insanely high
// scroll values. These browsers require a higher factor // scroll values. These browsers require a higher factor
if (Math.abs(e.wheelDeltaY) > max) if (Math.abs(e.wheelDeltaY) > max)
max = Math.abs(e.wheelDeltaY) max = Math.abs(e.wheelDeltaY);
if (max > 5000) if (max > 5000)
var factor = 400; var factor = 400;
@ -2089,7 +2089,7 @@ exports.addCommandKeyListener = function(el, callback) {
if (window.postMessage) { if (window.postMessage) {
var postMessageId = 1; var postMessageId = 1;
this.nextTick = function(callback, win) { exports.nextTick = function(callback, win) {
win = win || window; win = win || window;
var messageName = "zero-timeout-message-" + postMessageId; var messageName = "zero-timeout-message-" + postMessageId;
exports.addListener(win, "message", function listener(e) { exports.addListener(win, "message", function listener(e) {
@ -2103,7 +2103,7 @@ if (window.postMessage) {
}; };
} }
else { else {
this.nextTick = function(callback, win) { exports.nextTick = function(callback, win) {
win = win || window; win = win || window;
window.setTimeout(callback, 0); window.setTimeout(callback, 0);
}; };
@ -3949,7 +3949,7 @@ var TextInput = function(parentNode, host) {
clipboardData.setData("Text", copyText); clipboardData.setData("Text", copyText);
host.onCut(); host.onCut();
} }
event.preventDefault(e) event.preventDefault(e);
} }
}); });
} }
@ -3961,10 +3961,10 @@ var TextInput = function(parentNode, host) {
event.addListener(text, "compositionstart", onCompositionStart); event.addListener(text, "compositionstart", onCompositionStart);
if (useragent.isGecko) { if (useragent.isGecko) {
event.addListener(text, "text", onCompositionUpdate); event.addListener(text, "text", onCompositionUpdate);
}; }
if (useragent.isWebKit) { if (useragent.isWebKit) {
event.addListener(text, "keyup", onCompositionUpdate); event.addListener(text, "keyup", onCompositionUpdate);
}; }
event.addListener(text, "compositionend", onCompositionEnd); event.addListener(text, "compositionend", onCompositionEnd);
event.addListener(text, "blur", function() { event.addListener(text, "blur", function() {
@ -3988,7 +3988,7 @@ var TextInput = function(parentNode, host) {
function isFocused() { function isFocused() {
return document.activeElement === text; return document.activeElement === text;
}; }
this.isFocused = isFocused; this.isFocused = isFocused;
this.getElement = function() { this.getElement = function() {
@ -4002,12 +4002,12 @@ var TextInput = function(parentNode, host) {
text.style.cssText = text.style.cssText =
'position:fixed; z-index:1000;' + 'position:fixed; z-index:1000;' +
'left:' + (mousePos.x - 2) + 'px; top:' + (mousePos.y - 2) + 'px;' 'left:' + (mousePos.x - 2) + 'px; top:' + (mousePos.y - 2) + 'px;';
} }
if (isEmpty) if (isEmpty)
text.value=''; text.value='';
} };
this.onContextMenuClose = function(){ this.onContextMenuClose = function(){
setTimeout(function () { setTimeout(function () {
@ -4017,7 +4017,7 @@ var TextInput = function(parentNode, host) {
} }
sendText(); sendText();
}, 0); }, 0);
} };
}; };
exports.TextInput = TextInput; exports.TextInput = TextInput;
@ -4839,9 +4839,8 @@ var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
define('ace/keyboard/keybinding', ['require', 'exports', 'module' , 'ace/lib/useragent', 'ace/lib/keys', 'ace/lib/event', 'ace/commands/default_commands'], function(require, exports, module) { define('ace/keyboard/keybinding', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/event', 'ace/commands/default_commands'], function(require, exports, module) {
var useragent = require("../lib/useragent");
var keyUtil = require("../lib/keys"); var keyUtil = require("../lib/keys");
var event = require("../lib/event"); var event = require("../lib/event");
require("../commands/default_commands"); require("../commands/default_commands");
@ -4878,8 +4877,9 @@ var KeyBinding = function(editor) {
}; };
this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) { this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {
var toExecute;
for (var i = this.$handlers.length; i--;) { for (var i = this.$handlers.length; i--;) {
var toExecute = this.$handlers[i].handleKeyboard( toExecute = this.$handlers[i].handleKeyboard(
this.$data, hashId, keyString, keyCode, e this.$data, hashId, keyString, keyCode, e
); );
if (toExecute && toExecute.command) if (toExecute && toExecute.command)
@ -4899,13 +4899,13 @@ var KeyBinding = function(editor) {
if (success && e) if (success && e)
event.stopEvent(e); event.stopEvent(e);
return success return success;
}; };
this.handleKeyboard = function(data, hashId, keyString) { this.handleKeyboard = function(data, hashId, keyString) {
return { return {
command: this.$editor.commands.findKeyCommand(hashId, keyString) command: this.$editor.commands.findKeyCommand(hashId, keyString)
} };
}; };
this.onCommandKey = function(e, hashId, keyCode) { this.onCommandKey = function(e, hashId, keyCode) {
@ -5181,12 +5181,12 @@ exports.commands = [{
readOnly: true readOnly: true
}, { }, {
name: "togglerecording", name: "togglerecording",
bindKey: bindKey("Ctrl-Shift-E", "Ctrl-Shift-E"), bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"),
exec: function(editor) { editor.commands.toggleRecording(); }, exec: function(editor) { editor.commands.toggleRecording(); },
readOnly: true readOnly: true
}, { }, {
name: "replaymacro", name: "replaymacro",
bindKey: bindKey("Ctrl-E", "Ctrl-E"), bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"),
exec: function(editor) { editor.commands.replay(editor); }, exec: function(editor) { editor.commands.replay(editor); },
readOnly: true readOnly: true
}, },

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

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1900,7 +1900,7 @@ exports.addMouseWheelListener = function(el, callback) {
// some versions of Safari (e.g. 5.0.5) report insanely high // some versions of Safari (e.g. 5.0.5) report insanely high
// scroll values. These browsers require a higher factor // scroll values. These browsers require a higher factor
if (Math.abs(e.wheelDeltaY) > max) if (Math.abs(e.wheelDeltaY) > max)
max = Math.abs(e.wheelDeltaY) max = Math.abs(e.wheelDeltaY);
if (max > 5000) if (max > 5000)
var factor = 400; var factor = 400;
@ -2043,7 +2043,7 @@ exports.addCommandKeyListener = function(el, callback) {
if (window.postMessage) { if (window.postMessage) {
var postMessageId = 1; var postMessageId = 1;
this.nextTick = function(callback, win) { exports.nextTick = function(callback, win) {
win = win || window; win = win || window;
var messageName = "zero-timeout-message-" + postMessageId; var messageName = "zero-timeout-message-" + postMessageId;
exports.addListener(win, "message", function listener(e) { exports.addListener(win, "message", function listener(e) {
@ -2057,7 +2057,7 @@ if (window.postMessage) {
}; };
} }
else { else {
this.nextTick = function(callback, win) { exports.nextTick = function(callback, win) {
win = win || window; win = win || window;
window.setTimeout(callback, 0); window.setTimeout(callback, 0);
}; };
@ -3903,7 +3903,7 @@ var TextInput = function(parentNode, host) {
clipboardData.setData("Text", copyText); clipboardData.setData("Text", copyText);
host.onCut(); host.onCut();
} }
event.preventDefault(e) event.preventDefault(e);
} }
}); });
} }
@ -3915,10 +3915,10 @@ var TextInput = function(parentNode, host) {
event.addListener(text, "compositionstart", onCompositionStart); event.addListener(text, "compositionstart", onCompositionStart);
if (useragent.isGecko) { if (useragent.isGecko) {
event.addListener(text, "text", onCompositionUpdate); event.addListener(text, "text", onCompositionUpdate);
}; }
if (useragent.isWebKit) { if (useragent.isWebKit) {
event.addListener(text, "keyup", onCompositionUpdate); event.addListener(text, "keyup", onCompositionUpdate);
}; }
event.addListener(text, "compositionend", onCompositionEnd); event.addListener(text, "compositionend", onCompositionEnd);
event.addListener(text, "blur", function() { event.addListener(text, "blur", function() {
@ -3942,7 +3942,7 @@ var TextInput = function(parentNode, host) {
function isFocused() { function isFocused() {
return document.activeElement === text; return document.activeElement === text;
}; }
this.isFocused = isFocused; this.isFocused = isFocused;
this.getElement = function() { this.getElement = function() {
@ -3956,12 +3956,12 @@ var TextInput = function(parentNode, host) {
text.style.cssText = text.style.cssText =
'position:fixed; z-index:1000;' + 'position:fixed; z-index:1000;' +
'left:' + (mousePos.x - 2) + 'px; top:' + (mousePos.y - 2) + 'px;' 'left:' + (mousePos.x - 2) + 'px; top:' + (mousePos.y - 2) + 'px;';
} }
if (isEmpty) if (isEmpty)
text.value=''; text.value='';
} };
this.onContextMenuClose = function(){ this.onContextMenuClose = function(){
setTimeout(function () { setTimeout(function () {
@ -3971,7 +3971,7 @@ var TextInput = function(parentNode, host) {
} }
sendText(); sendText();
}, 0); }, 0);
} };
}; };
exports.TextInput = TextInput; exports.TextInput = TextInput;
@ -4793,9 +4793,8 @@ var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
__ace_shadowed__.define('ace/keyboard/keybinding', ['require', 'exports', 'module' , 'ace/lib/useragent', 'ace/lib/keys', 'ace/lib/event', 'ace/commands/default_commands'], function(require, exports, module) { __ace_shadowed__.define('ace/keyboard/keybinding', ['require', 'exports', 'module' , 'ace/lib/keys', 'ace/lib/event', 'ace/commands/default_commands'], function(require, exports, module) {
var useragent = require("../lib/useragent");
var keyUtil = require("../lib/keys"); var keyUtil = require("../lib/keys");
var event = require("../lib/event"); var event = require("../lib/event");
require("../commands/default_commands"); require("../commands/default_commands");
@ -4832,8 +4831,9 @@ var KeyBinding = function(editor) {
}; };
this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) { this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {
var toExecute;
for (var i = this.$handlers.length; i--;) { for (var i = this.$handlers.length; i--;) {
var toExecute = this.$handlers[i].handleKeyboard( toExecute = this.$handlers[i].handleKeyboard(
this.$data, hashId, keyString, keyCode, e this.$data, hashId, keyString, keyCode, e
); );
if (toExecute && toExecute.command) if (toExecute && toExecute.command)
@ -4853,13 +4853,13 @@ var KeyBinding = function(editor) {
if (success && e) if (success && e)
event.stopEvent(e); event.stopEvent(e);
return success return success;
}; };
this.handleKeyboard = function(data, hashId, keyString) { this.handleKeyboard = function(data, hashId, keyString) {
return { return {
command: this.$editor.commands.findKeyCommand(hashId, keyString) command: this.$editor.commands.findKeyCommand(hashId, keyString)
} };
}; };
this.onCommandKey = function(e, hashId, keyCode) { this.onCommandKey = function(e, hashId, keyCode) {
@ -5135,12 +5135,12 @@ exports.commands = [{
readOnly: true readOnly: true
}, { }, {
name: "togglerecording", name: "togglerecording",
bindKey: bindKey("Ctrl-Shift-E", "Ctrl-Shift-E"), bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"),
exec: function(editor) { editor.commands.toggleRecording(); }, exec: function(editor) { editor.commands.toggleRecording(); },
readOnly: true readOnly: true
}, { }, {
name: "replaymacro", name: "replaymacro",
bindKey: bindKey("Ctrl-E", "Ctrl-E"), bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"),
exec: function(editor) { editor.commands.replay(editor); }, exec: function(editor) { editor.commands.replay(editor); },
readOnly: true readOnly: true
}, },

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

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long