This commit is contained in:
Fabian Jakobs 2011-12-07 10:56:09 +01:00
commit 96b6abb615
23 changed files with 141 additions and 125 deletions

View file

@ -131,6 +131,12 @@ To package Ace we use the dryice build tool developed by the Mozilla Skywriter t
git submodule update --init --recursive
```
Make sure you at least version 0.3.0 of dryice
```bash
npm install dryice
```
Afterwards Ace can be built by calling
```bash

View file

@ -81,7 +81,7 @@ function inject() {
load.scripts = {};
window.__ace_shadowed_load__ = load;
load('ace-uncompressed.js', 'text!ace/css/editor.css', function() {
load('ace.js', 'text!ace/css/editor.css', function() {
var ace = window.__ace_shadowed__;
ace.options.mode = "javascript";
var Event = ace.require("ace/lib/event");

View file

@ -165,7 +165,7 @@ window.__ace_shadowed__ = {
require: function(module, callback) {
return _require("", module, callback);
},
define: _define
define: _define
};
})();// vim:set ts=4 sts=4 sw=4 st:
@ -4866,7 +4866,7 @@ var KeyBinding = function(editor) {
};
this.getKeyboardHandler = function() {
return this.$handlers[this.$handlers - 1];
return this.$handlers[this.$handlers.length - 1];
};
this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {
@ -6295,10 +6295,10 @@ var EditSession = function(text, mode) {
var useWrapMode = this.$useWrapMode;
var len;
var action = e.data.action;
var firstRow = e.data.range.start.row,
lastRow = e.data.range.end.row,
start = e.data.range.start,
end = e.data.range.end;
var firstRow = e.data.range.start.row;
var lastRow = e.data.range.end.row;
var start = e.data.range.start;
var end = e.data.range.end;
var removedFolds = null;
if (action.indexOf("Lines") != -1) {
@ -6465,7 +6465,7 @@ var EditSession = function(text, mode) {
TAB = 11,
TAB_SPACE = 12;
this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) {
this.$computeWrapSplits = function(tokens, wrapLimit) {
if (tokens.length == 0) {
return [];
}
@ -6482,11 +6482,11 @@ var EditSession = function(text, mode) {
var len = displayed.length;
displayed.join("").
// Get all the TAB_SPACEs.
replace(/12/g, function(m) {
replace(/12/g, function() {
len -= 1;
}).
// Get all the CHAR_EXT/multipleWidth characters.
replace(/2/g, function(m) {
replace(/2/g, function() {
len -= 1;
});
@ -8613,7 +8613,7 @@ var Document = function(text) {
case "auto":
return this.$autoNewLine;
}
},
};
this.$autoNewLine = "\n";
this.$newLineMode = "auto";
@ -8676,7 +8676,7 @@ var Document = function(text) {
position.column = this.getLine(length-1).length;
}
return position;
}
};
this.insert = function(position, text) {
if (text.length == 0)
@ -8716,7 +8716,7 @@ var Document = function(text) {
};
this._dispatchEvent("change", { data: delta });
return range.end;
},
};
this.insertNewLine = function(position) {
position = this.$clipPosition(position);
@ -8879,13 +8879,13 @@ var Document = function(text) {
var range = Range.fromPoints(delta.range.start, delta.range.end);
if (delta.action == "insertLines")
this.insertLines(range.start.row, delta.lines)
this.insertLines(range.start.row, delta.lines);
else if (delta.action == "insertText")
this.insert(range.start, delta.text)
this.insert(range.start, delta.text);
else if (delta.action == "removeLines")
this.removeLines(range.start.row, range.end.row - 1)
this.removeLines(range.start.row, range.end.row - 1);
else if (delta.action == "removeText")
this.remove(range)
this.remove(range);
}
};
@ -8896,13 +8896,13 @@ var Document = function(text) {
var range = Range.fromPoints(delta.range.start, delta.range.end);
if (delta.action == "insertLines")
this.removeLines(range.start.row, range.end.row - 1)
this.removeLines(range.start.row, range.end.row - 1);
else if (delta.action == "insertText")
this.remove(range)
this.remove(range);
else if (delta.action == "removeLines")
this.insertLines(range.start.row, delta.lines)
this.insertLines(range.start.row, delta.lines);
else if (delta.action == "removeText")
this.insert(range.start, delta.text)
this.insert(range.start, delta.text);
}
};
@ -13537,7 +13537,7 @@ __ace_shadowed__.define("text!ace/css/editor.css", [], "@import url(//fonts.goog
"\n" +
".ace_editor textarea {\n" +
" position: fixed;\n" +
" z-index: -1;\n" +
" z-index: 2000;\n" +
" width: 10px;\n" +
" height: 30px;\n" +
" opacity: 0;\n" +
@ -13973,7 +13973,7 @@ __ace_shadowed__.define("text!ace/css/editor.css", [], "@import url(//fonts.goog
"\n" +
".ace_editor textarea {\n" +
" position: fixed;\n" +
" z-index: -1;\n" +
" z-index: 2000;\n" +
" width: 10px;\n" +
" height: 30px;\n" +
" opacity: 0;\n" +

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

@ -0,0 +1 @@
__ace_shadowed__.define("ace/theme/chrome",["require","exports","module"],function(a,b,c){b.cssClass="ace-chrome",b.cssText=".ace-chrome .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-chrome .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-chrome .ace_gutter { width: 50px; background: #e8e8e8; color: #333; overflow : hidden;}.ace-chrome .ace_gutter-layer { width: 100%; text-align: right;}.ace-chrome .ace_gutter-layer .ace_gutter-cell { padding-right: 6px;}.ace-chrome .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-chrome .ace_text-layer { cursor: text;}.ace-chrome .ace_cursor { border-left: 2px solid black;}.ace-chrome .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid black;} .ace-chrome .ace_line .ace_invisible { color: rgb(191, 191, 191);}.ace-chrome .ace_line .ace_keyword { color: blue;}.ace-chrome .ace_line .ace_constant.ace_buildin { color: rgb(88, 72, 246);}.ace-chrome .ace_line .ace_constant.ace_language { color: rgb(88, 92, 246);}.ace-chrome .ace_line .ace_constant.ace_library { color: rgb(6, 150, 14);}.ace-chrome .ace_line .ace_invalid { background-color: rgb(153, 0, 0); color: white;}.ace-chrome .ace_line .ace_fold { background-color: #E4E4E4; border-radius: 3px;}.ace-chrome .ace_line .ace_support.ace_function { color: rgb(60, 76, 114);}.ace-chrome .ace_line .ace_support.ace_constant { color: rgb(6, 150, 14);}.ace-chrome .ace_line .ace_support.ace_type,.ace-chrome .ace_line .ace_support.ace_class { color: rgb(109, 121, 222);}.ace-chrome .ace_line .ace_keyword.ace_operator { color: rgb(104, 118, 135);}.ace-chrome .ace_line .ace_string { color: #1919a6;}.ace-chrome .ace_line .ace_comment { color: #236e24;}.ace-chrome .ace_line .ace_comment.ace_doc { color: #236e24;}.ace-chrome .ace_line .ace_comment.ace_doc.ace_tag { color: #236e24;}.ace-chrome .ace_line .ace_constant.ace_numeric { color: rgb(0, 0, 205);}.ace-chrome .ace_line .ace_variable { color: rgb(49, 132, 149);}.ace-chrome .ace_line .ace_xml_pe { color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function { color: #0000A2;}.ace-chrome .ace_markup.ace_markupine { text-decoration:underline;}.ace-chrome .ace_markup.ace_heading { color: rgb(12, 7, 255);}.ace-chrome .ace_markup.ace_list { color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection { background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step { background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack { background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active_line { background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_marker-layer .ace_selected_word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_meta.ace_tag { color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex { color: rgb(255, 0, 0)}.ace-chrome .ace_entity.ace_other.ace_attribute-name{ color: #994409;}"})