Commit 47097d9e authored by Jérome Perrin's avatar Jérome Perrin
parent 7bb5c6c7
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155552.62</string> </value>
<value> <string>ts83646622.78</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155552.86</string> </value>
<value> <string>ts83646622.76</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -198,7 +198,7 @@ module.exports.getEditorKeybordShortcuts = function(editor) {\n
var keybindings = [];\n
var commandMap = {};\n
editor.keyBinding.$handlers.forEach(function(handler) {\n
var ckb = handler.commmandKeyBinding;\n
var ckb = handler.commandKeyBinding;\n
for (var i in ckb) {\n
var modifier = parseInt(i);\n
if (modifier == -1) {\n
......@@ -238,7 +238,7 @@ module.exports.getEditorKeybordShortcuts = function(editor) {\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>7803</int> </value>
<value> <int>7802</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.0</string> </value>
<value> <string>ts83646622.7</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -59,17 +59,17 @@ Mode.prototype.supportsFile = function(filename) {\n
};\n
var supportedModes = {\n
ABAP: ["abap"],\n
ADA: ["ada|adb"],\n
ActionScript:["as"],\n
ADA: ["ada|adb"],\n
AsciiDoc: ["asciidoc"],\n
Assembly_x86:["asm"],\n
AutoHotKey: ["ahk"],\n
BatchFile: ["bat|cmd"],\n
C9Search: ["c9search_results"],\n
C_Cpp: ["c|cc|cpp|cxx|h|hh|hpp"],\n
C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp"],\n
Clojure: ["clj"],\n
Cobol: ["^CBL|COB"],\n
coffee: ["^Cakefile|coffee|cf|cson"],\n
Cobol: ["CBL|COB"],\n
coffee: ["coffee|cf|cson|^Cakefile"],\n
ColdFusion: ["cfm"],\n
CSharp: ["cs"],\n
CSS: ["css"],\n
......@@ -81,25 +81,27 @@ var supportedModes = {\n
Erlang: ["erl|hrl"],\n
EJS: ["ejs"],\n
Forth: ["frt|fs|ldr"],\n
FreeMarker: ["ftl"],\n
FTL: ["ftl"],\n
Glsl: ["glsl|frag|vert"],\n
golang: ["go"],\n
Groovy: ["groovy"],\n
HAML: ["haml"],\n
Handlebars: ["hbs|handlebars|tpl|mustache"],\n
Haskell: ["hs"],\n
haXe: ["hx"],\n
HTML: ["htm|html|xhtml"],\n
HTML: ["html|htm|xhtml"],\n
HTML_Ruby: ["erb|rhtml|html.erb"],\n
Ini: ["Ini|conf"],\n
INI: ["ini|conf|cfg|prefs"],\n
Jack: ["jack"],\n
Jade: ["jade"],\n
Java: ["java"],\n
JavaScript: ["js"],\n
JavaScript: ["js|jsm"],\n
JSON: ["json"],\n
JSONiq: ["jq"],\n
JSP: ["jsp"],\n
JSX: ["jsx"],\n
Julia: ["jl"],\n
LaTeX: ["latex|tex|ltx|bib"],\n
LaTeX: ["tex|latex|ltx|bib"],\n
LESS: ["less"],\n
Liquid: ["liquid"],\n
Lisp: ["lisp"],\n
......@@ -109,11 +111,12 @@ var supportedModes = {\n
Lua: ["lua"],\n
LuaPage: ["lp"],\n
Lucene: ["lucene"],\n
Makefile: ["^GNUmakefile|^makefile|^Makefile|^OCamlMakefile|make"],\n
Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],\n
MATLAB: ["matlab"],\n
Markdown: ["md|markdown"],\n
MySQL: ["mysql"],\n
MUSHCode: ["mc|mush"],\n
Nix: ["nix"],\n
ObjectiveC: ["m|mm"],\n
OCaml: ["ml|mli"],\n
Pascal: ["pas|p"],\n
......@@ -123,19 +126,23 @@ var supportedModes = {\n
Powershell: ["ps1"],\n
Prolog: ["plg|prolog"],\n
Properties: ["properties"],\n
Protobuf: ["proto"],\n
Python: ["py"],\n
R: ["r"],\n
RDoc: ["Rd"],\n
RHTML: ["Rhtml"],\n
Ruby: ["ru|gemspec|rake|rb"],\n
Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],\n
Rust: ["rs"],\n
SASS: ["sass"],\n
SCAD: ["scad"],\n
Scala: ["scala"],\n
Scheme: ["scm|rkt"],\n
SCSS: ["scss"],\n
SH: ["sh|bash"],\n
SH: ["sh|bash|^.bashrc"],\n
SJS: ["sjs"],\n
Space: ["space"],\n
snippets: ["snippets"],\n
Soy_Template:["soy"],\n
SQL: ["sql"],\n
Stylus: ["styl|stylus"],\n
SVG: ["svg"],\n
......@@ -145,12 +152,13 @@ var supportedModes = {\n
Textile: ["textile"],\n
Toml: ["toml"],\n
Twig: ["twig"],\n
Typescript: ["typescript|ts|str"],\n
Typescript: ["ts|typescript|str"],\n
VBScript: ["vbs"],\n
Velocity: ["vm"],\n
Verilog: ["v|vh|sv|svh"],\n
XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],\n
XQuery: ["xq"],\n
YAML: ["yaml"]\n
YAML: ["yaml|yml"]\n
};\n
\n
var nameOverrides = {\n
......@@ -159,7 +167,8 @@ var nameOverrides = {\n
golang: "Go",\n
C_Cpp: "C/C++",\n
coffee: "CoffeeScript",\n
HTML_Ruby: "HTML (Ruby)"\n
HTML_Ruby: "HTML (Ruby)",\n
FTL: "FreeMarker"\n
};\n
var modesByName = {};\n
for (var name in supportedModes) {\n
......@@ -189,7 +198,7 @@ module.exports = {\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4320</int> </value>
<value> <int>4644</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.14</string> </value>
<value> <string>ts83646622.68</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.29</string> </value>
<value> <string>ts83646622.67</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -222,7 +222,7 @@ var html = \'<div class="ace_search right">\\\n
</div>\\\n
<div class="ace_replace_form">\\\n
<input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>\\\n
<button type="button" action="replace" class="ace_replacebtn">Replace</button>\\\n
<button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>\\\n
<button type="button" action="replaceAll" class="ace_replacebtn">All</button>\\\n
</div>\\\n
<div class="ace_search_options">\\\n
......@@ -248,9 +248,7 @@ var SearchBox = function(editor, range, showReplaceForm) {\n
this.editor = editor;\n
};\n
\n
this.$init = function() {\n
var sb = this.element;\n
\n
this.$initElements = function(sb) {\n
this.searchBox = sb.querySelector(".ace_search_form");\n
this.replaceBox = sb.querySelector(".ace_replace_form");\n
this.searchOptions = sb.querySelector(".ace_search_options");\n
......@@ -259,7 +257,13 @@ var SearchBox = function(editor, range, showReplaceForm) {\n
this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]");\n
this.searchInput = this.searchBox.querySelector(".ace_search_field");\n
this.replaceInput = this.replaceBox.querySelector(".ace_search_field");\n
\n
};\n
\n
this.$init = function() {\n
var sb = this.element;\n
\n
this.$initElements(sb);\n
\n
var _this = this;\n
event.addListener(sb, "mousedown", function(e) {\n
setTimeout(function(){\n
......@@ -268,7 +272,7 @@ var SearchBox = function(editor, range, showReplaceForm) {\n
event.stopPropagation(e);\n
});\n
event.addListener(sb, "click", function(e) {\n
var t = e.target;\n
var t = e.target || e.srcElement;\n
var action = t.getAttribute("action");\n
if (action && _this[action])\n
_this[action]();\n
......@@ -383,7 +387,9 @@ var SearchBox = function(editor, range, showReplaceForm) {\n
caseSensitive: this.caseSensitiveOption.checked,\n
wholeWord: this.wholeWordOption.checked\n
});\n
dom.setCssClass(this.searchBox, "ace_nomatch", !range && this.searchInput.value);\n
var noMatch = !range && this.searchInput.value;\n
dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);\n
this.editor._emit("findSearchBox", { match: !noMatch });\n
this.highlight();\n
};\n
this.findNext = function() {\n
......@@ -393,9 +399,17 @@ var SearchBox = function(editor, range, showReplaceForm) {\n
this.find(true, true);\n
};\n
this.replace = function() {\n
if (!this.editor.getReadOnly())\n
this.editor.replace(this.replaceInput.value);\n
}; \n
this.replaceAndFindNext = function() {\n
if (!this.editor.getReadOnly()) {\n
this.editor.replace(this.replaceInput.value);\n
this.findNext()\n
}\n
};\n
this.replaceAll = function() {\n
if (!this.editor.getReadOnly())\n
this.editor.replaceAll(this.replaceInput.value);\n
};\n
\n
......@@ -427,47 +441,6 @@ exports.Search = function(editor, isReplace) {\n
sb.show(editor.session.getTextRange(), isReplace);\n
};\n
\n
\n
exports.ISearch = function(session, options) {\n
this.$changeListener = this.$changeListener.bind(this);\n
this.startRange = session.selection.toOrientedRange();\n
this.options = options || {};\n
};\n
\n
(function(){\n
this.setSession = function(session) {\n
if (this.session) {\n
this.session.removeListener(this.$changeListener);\n
}\n
this.session = session;\n
this.session.addListener(this.$changeListener);\n
};\n
this.setSearchString = function() {\n
\n
};\n
this.getValue = function() {\n
if (this.value == null)\n
this.value = this.session.getValue();\n
return this.value;\n
};\n
this.$changeListener = function() {\n
this.value = null;\n
};\n
this.find = function() {\n
\n
};\n
this.$edgeBefore = function() {\n
this.cursor = this.startRange[this.options.backwards ? "start" : "end"];\n
};\n
this.$edgeAfter = function() {\n
\n
};\n
this.next = function(dir) {\n
\n
};\n
}).call(exports.ISearch.prototype);\n
\n
\n
});\n
......@@ -479,7 +452,7 @@ exports.ISearch = function(session, options) {\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>14773</int> </value>
<value> <int>14267</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.44</string> </value>
<value> <string>ts83646622.66</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -327,17 +327,17 @@ Mode.prototype.supportsFile = function(filename) {\n
};\n
var supportedModes = {\n
ABAP: ["abap"],\n
ADA: ["ada|adb"],\n
ActionScript:["as"],\n
ADA: ["ada|adb"],\n
AsciiDoc: ["asciidoc"],\n
Assembly_x86:["asm"],\n
AutoHotKey: ["ahk"],\n
BatchFile: ["bat|cmd"],\n
C9Search: ["c9search_results"],\n
C_Cpp: ["c|cc|cpp|cxx|h|hh|hpp"],\n
C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp"],\n
Clojure: ["clj"],\n
Cobol: ["^CBL|COB"],\n
coffee: ["^Cakefile|coffee|cf|cson"],\n
Cobol: ["CBL|COB"],\n
coffee: ["coffee|cf|cson|^Cakefile"],\n
ColdFusion: ["cfm"],\n
CSharp: ["cs"],\n
CSS: ["css"],\n
......@@ -349,25 +349,27 @@ var supportedModes = {\n
Erlang: ["erl|hrl"],\n
EJS: ["ejs"],\n
Forth: ["frt|fs|ldr"],\n
FreeMarker: ["ftl"],\n
FTL: ["ftl"],\n
Glsl: ["glsl|frag|vert"],\n
golang: ["go"],\n
Groovy: ["groovy"],\n
HAML: ["haml"],\n
Handlebars: ["hbs|handlebars|tpl|mustache"],\n
Haskell: ["hs"],\n
haXe: ["hx"],\n
HTML: ["htm|html|xhtml"],\n
HTML: ["html|htm|xhtml"],\n
HTML_Ruby: ["erb|rhtml|html.erb"],\n
Ini: ["Ini|conf"],\n
INI: ["ini|conf|cfg|prefs"],\n
Jack: ["jack"],\n
Jade: ["jade"],\n
Java: ["java"],\n
JavaScript: ["js"],\n
JavaScript: ["js|jsm"],\n
JSON: ["json"],\n
JSONiq: ["jq"],\n
JSP: ["jsp"],\n
JSX: ["jsx"],\n
Julia: ["jl"],\n
LaTeX: ["latex|tex|ltx|bib"],\n
LaTeX: ["tex|latex|ltx|bib"],\n
LESS: ["less"],\n
Liquid: ["liquid"],\n
Lisp: ["lisp"],\n
......@@ -377,11 +379,12 @@ var supportedModes = {\n
Lua: ["lua"],\n
LuaPage: ["lp"],\n
Lucene: ["lucene"],\n
Makefile: ["^GNUmakefile|^makefile|^Makefile|^OCamlMakefile|make"],\n
Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],\n
MATLAB: ["matlab"],\n
Markdown: ["md|markdown"],\n
MySQL: ["mysql"],\n
MUSHCode: ["mc|mush"],\n
Nix: ["nix"],\n
ObjectiveC: ["m|mm"],\n
OCaml: ["ml|mli"],\n
Pascal: ["pas|p"],\n
......@@ -391,19 +394,23 @@ var supportedModes = {\n
Powershell: ["ps1"],\n
Prolog: ["plg|prolog"],\n
Properties: ["properties"],\n
Protobuf: ["proto"],\n
Python: ["py"],\n
R: ["r"],\n
RDoc: ["Rd"],\n
RHTML: ["Rhtml"],\n
Ruby: ["ru|gemspec|rake|rb"],\n
Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],\n
Rust: ["rs"],\n
SASS: ["sass"],\n
SCAD: ["scad"],\n
Scala: ["scala"],\n
Scheme: ["scm|rkt"],\n
SCSS: ["scss"],\n
SH: ["sh|bash"],\n
SH: ["sh|bash|^.bashrc"],\n
SJS: ["sjs"],\n
Space: ["space"],\n
snippets: ["snippets"],\n
Soy_Template:["soy"],\n
SQL: ["sql"],\n
Stylus: ["styl|stylus"],\n
SVG: ["svg"],\n
......@@ -413,12 +420,13 @@ var supportedModes = {\n
Textile: ["textile"],\n
Toml: ["toml"],\n
Twig: ["twig"],\n
Typescript: ["typescript|ts|str"],\n
Typescript: ["ts|typescript|str"],\n
VBScript: ["vbs"],\n
Velocity: ["vm"],\n
Verilog: ["v|vh|sv|svh"],\n
XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],\n
XQuery: ["xq"],\n
YAML: ["yaml"]\n
YAML: ["yaml|yml"]\n
};\n
\n
var nameOverrides = {\n
......@@ -427,7 +435,8 @@ var nameOverrides = {\n
golang: "Go",\n
C_Cpp: "C/C++",\n
coffee: "CoffeeScript",\n
HTML_Ruby: "HTML (Ruby)"\n
HTML_Ruby: "HTML (Ruby)",\n
FTL: "FreeMarker"\n
};\n
var modesByName = {};\n
for (var name in supportedModes) {\n
......@@ -487,8 +496,8 @@ module.exports.themes = [\n
"kr_theme",\n
"merbivore",\n
"merbivore_soft",\n
"monokai",\n
"mono_industrial",\n
"monokai",\n
"pastel_on_dark",\n
"solarized_dark",\n
"solarized_light",\n
......@@ -656,7 +665,7 @@ module.exports.overlayPage = function overlayPage(editor, contentElement, top, r
</item>
<item>
<key> <string>size</string> </key>
<value> <int>19778</int> </value>
<value> <int>20102</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.56</string> </value>
<value> <string>ts83646622.64</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -39,8 +39,9 @@ exports.contextMenuHandler = function(e){\n
var PLACEHOLDER = "\\x01\\x01";\n
var value = w + " " + PLACEHOLDER;\n
text.value = value;\n
text.setSelectionRange(w.length + 1, w.length + 1);\n
text.setSelectionRange(w.length, w.length + 1);\n
text.setSelectionRange(0, 0);\n
text.setSelectionRange(0, w.length);\n
\n
var afterKeydown = false;\n
event.addListener(text, "keydown", function onKeydown() {\n
......@@ -95,7 +96,7 @@ require("../config").defineOptions(Editor.prototype, "editor", {\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>2227</int> </value>
<value> <int>2264</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.66</string> </value>
<value> <string>ts83646622.63</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -52,34 +52,37 @@
*\n
* ***** END LICENSE BLOCK ***** */\n
\n
define(\'ace/ext/static_highlight\', [\'require\', \'exports\', \'module\' , \'ace/edit_session\', \'ace/layer/text\', \'ace/config\'], function(require, exports, module) {\n
define(\'ace/ext/static_highlight\', [\'require\', \'exports\', \'module\' , \'ace/edit_session\', \'ace/layer/text\', \'ace/config\', \'ace/lib/dom\'], function(require, exports, module) {\n
\n
\n
var EditSession = require("../edit_session").EditSession;\n
var TextLayer = require("../layer/text").Text;\n
var baseStyles = ".ace_editor {\\\n
font-family: \'Monaco\', \'Menlo\', \'Droid Sans Mono\', \'Courier New\', monospace;\\\n
var baseStyles = ".ace_static_highlight {\\\n
font-family: \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', \'Droid Sans Mono\', monospace;\\\n
font-size: 12px;\\\n
}\\\n
.ace_editor .ace_gutter {\\\n
.ace_static_highlight .ace_gutter {\\\n
width: 25px !important;\\\n
display: block;\\\n
float: left;\\\n
text-align: right;\\\n
padding: 0 3px 0 0;\\\n
margin-right: 3px;\\\n
position: static !important;\\\n
}\\\n
.ace_line { clear: both; }\\\n
*.ace_gutter-cell {\\\n
.ace_static_highlight .ace_line { clear: both; }\\\n
.ace_static_highlight .ace_gutter-cell {\\\n
-moz-user-select: -moz-none;\\\n
-khtml-user-select: none;\\\n
-webkit-user-select: none;\\\n
user-select: none;\\\n
}";\n
var config = require("../config");\n
var dom = require("../lib/dom");\n
\n
exports.render = function(input, mode, theme, lineStart, disableGutter, callback) {\n
var waiting = 0\n
var waiting = 0;\n
var modeCache = EditSession.prototype.$modes;\n
if (typeof theme == "string") {\n
waiting++;\n
config.loadModule([\'theme\', theme], function(m) {\n
......@@ -91,7 +94,8 @@ exports.render = function(input, mode, theme, lineStart, disableGutter, callback
if (typeof mode == "string") {\n
waiting++;\n
config.loadModule([\'mode\', mode], function(m) {\n
mode = new m.Mode()\n
if (!modeCache[mode]) modeCache[mode] = new m.Mode();\n
mode = modeCache[mode];\n
--waiting || done();\n
});\n
}\n
......@@ -128,11 +132,11 @@ exports.renderSync = function(input, mode, theme, lineStart, disableGutter) {\n
textLayer.$renderLine(stringBuilder, ix, true, false);\n
stringBuilder.push("</div>");\n
}\n
var html = "<div class=\':cssClass\'>\\\n
<div class=\'ace_editor ace_scroller ace_text-layer\'>\\\n
:code\\\n
</div>\\\n
</div>".replace(/:cssClass/, theme.cssClass).replace(/:code/, stringBuilder.join(""));\n
var html = "<div class=\'" + theme.cssClass + "\'>" +\n
"<div class=\'ace_static_highlight\'>" +\n
stringBuilder.join("") +\n
"</div>" +\n
"</div>";\n
\n
textLayer.destroy();\n
\n
......@@ -142,6 +146,46 @@ exports.renderSync = function(input, mode, theme, lineStart, disableGutter) {\n
};\n
};\n
\n
\n
\n
exports.highlight = function(el, opts, callback) {\n
var m = el.className.match(/lang-(\\w+)/);\n
var mode = opts.mode || m && ("ace/mode/" + m[1]);\n
if (!mode)\n
return false;\n
var theme = opts.theme || "ace/theme/textmate";\n
\n
var data = "";\n
var nodes = [];\n
\n
if (el.firstElementChild) {\n
var textLen = 0;\n
for (var i = 0; i < el.childNodes.length; i++) {\n
var ch = el.childNodes[i];\n
if (ch.nodeType == 3) {\n
textLen += ch.data.length;\n
data += ch.data;\n
} else {\n
nodes.push(textLen, ch);\n
}\n
}\n
} else {\n
data = dom.getInnerText(el);\n
}\n
\n
exports.render(data, mode, theme, 1, true, function (highlighted) {\n
dom.importCssString(highlighted.css, "ace_highlight");\n
el.innerHTML = highlighted.html;\n
var container = el.firstChild.firstChild\n
for (var i = 0; i < nodes.length; i += 2) {\n
var pos = highlighted.session.doc.indexToPosition(nodes[i])\n
var node = nodes[i + 1];\n
var lineEl = container.children[pos.row];\n
lineEl && lineEl.appendChild(nodes[i+1]);\n
}\n
callback && callback();\n
});\n
};\n
});\n
......@@ -153,7 +197,7 @@ exports.renderSync = function(input, mode, theme, lineStart, disableGutter) {\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4310</int> </value>
<value> <int>5794</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.77</string> </value>
<value> <string>ts83646622.6</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155553.93</string> </value>
<value> <string>ts83646622.59</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -88,7 +88,7 @@ function applyStyles(elm, styles) {\n
\n
function setupContainer(element, getValue) {\n
if (element.type != \'textarea\') {\n
throw "Textarea required!";\n
throw new Error("Textarea required!");\n
}\n
\n
var parentNode = element.parentNode;\n
......@@ -247,21 +247,18 @@ function setupApi(editor, editorDiv, settingDiv, ace, options, loader) {\n
settingDiv.hideButton.focus();\n
editor.on("focus", function onFocus() {\n
editor.removeListener("focus", onFocus);\n
settingDiv.style.display = "none"\n
settingDiv.style.display = "none";\n
});\n
} else {\n
editor.focus();\n
};\n
}\n
};\n
\n
editor.$setOption = editor.setOption;\n
editor.setOption = function(key, value) {\n
if (options[key] == value) return;\n
\n
switch (key) {\n
case "gutter":\n
renderer.setShowGutter(toBool(value));\n
break;\n
\n
case "mode":\n
if (value != "text") {\n
loader("mode-" + value + ".js", "ace/mode/" + value, function() {\n
......@@ -323,18 +320,9 @@ function setupApi(editor, editorDiv, settingDiv, ace, options, loader) {\n
break;\n
}\n
break;\n
\n
case "useSoftTabs":\n
session.setUseSoftTabs(toBool(value));\n
break;\n
\n
case "showPrintMargin":\n
renderer.setShowPrintMargin(toBool(value));\n
break;\n
\n
case "showInvisibles":\n
editor.setShowInvisibles(toBool(value));\n
break;\n
\n
default:\n
editor.$setOption(key, toBool(value));\n
}\n
\n
options[key] = value;\n
......@@ -348,9 +336,7 @@ function setupApi(editor, editorDiv, settingDiv, ace, options, loader) {\n
return options;\n
};\n
\n
for (var option in exports.options) {\n
editor.setOption(option, exports.options[option]);\n
}\n
editor.setOptions(exports.options);\n
\n
return editor;\n
}\n
......@@ -450,7 +436,7 @@ function setupSettingPanel(settingDiv, settingOpener, editor, options) {\n
cValue == "true" ? "checked=\'true\'" : "",\n
"\'></input>"\n
);\n
return\n
return;\n
}\n
builder.push("<select title=\'" + option + "\'>");\n
for (var value in obj) {\n
......@@ -524,7 +510,7 @@ exports.options = {\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>16096</int> </value>
<value> <int>15735</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155554.04</string> </value>
<value> <string>ts83646622.57</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -92,8 +92,8 @@ module.exports.themes = [\n
"kr_theme",\n
"merbivore",\n
"merbivore_soft",\n
"monokai",\n
"mono_industrial",\n
"monokai",\n
"pastel_on_dark",\n
"solarized_dark",\n
"solarized_light",\n
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155554.14</string> </value>
<value> <string>ts83646622.56</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -82,7 +82,7 @@ exports.$detectIndentation = function(lines, fallback) {\n
prevSpaces = spaces;\n
while (line[line.length - 1] == "\\\\")\n
line = lines[i++];\n
};\n
}\n
\n
function getScore(indent) {\n
var score = 0;\n
......@@ -132,15 +132,17 @@ exports.detectIndentation = function(session) {\n
return indent;\n
};\n
\n
exports.trimTrailingSpace = function(session) {\n
exports.trimTrailingSpace = function(session, trimEmpty) {\n
var doc = session.getDocument();\n
var lines = doc.getAllLines();\n
\n
var min = trimEmpty ? -1 : 0;\n
\n
for (var i = 0, l=lines.length; i < l; i++) {\n
var line = lines[i];\n
var index = line.search(/\\s+$/);\n
\n
if (index !== -1)\n
if (index > min)\n
doc.removeInLine(i, index, line.length);\n
}\n
};\n
......@@ -179,14 +181,14 @@ exports.convertIndentation = function(session, ch, len) {\n
};\n
\n
exports.$parseStringArg = function(text) {\n
var indent = {}\n
var indent = {};\n
if (/t/.test(text))\n
indent.ch = "\\t";\n
else if (/s/.test(text))\n
indent.ch = " ";\n
var m = text.match(/\\d+/);\n
if (m)\n
indent.length = parseInt(m[0]);\n
indent.length = parseInt(m[0], 10);\n
return indent;\n
};\n
\n
......@@ -198,7 +200,7 @@ exports.$parseArg = function(arg) {\n
if (typeof arg.text == "string")\n
return exports.$parseStringArg(arg.text);\n
return arg;\n
}\n
};\n
\n
exports.commands = [{\n
name: "detectIndentation",\n
......@@ -214,7 +216,7 @@ exports.commands = [{\n
name: "convertIndentation",\n
exec: function(editor, arg) {\n
var indent = exports.$parseArg(arg);\n
exports.convertIndentation(editor.session, arg.ch, arg.length);\n
exports.convertIndentation(editor.session, indent.ch, indent.length);\n
}\n
}, {\n
name: "setIndentation",\n
......@@ -223,7 +225,7 @@ exports.commands = [{\n
indent.length && editor.session.setTabSize(indent.length);\n
indent.ch && editor.session.setUseSoftTabs(indent.ch == " ");\n
}\n
}]\n
}];\n
\n
});\n
......@@ -236,7 +238,7 @@ exports.commands = [{\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>6632</int> </value>
<value> <int>6693</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155554.27</string> </value>
<value> <string>ts83646622.54</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -95,7 +95,7 @@ exports.handler.attach = function(editor) {\n
background-color: rgba(0,250,0,0.9);\\\n
opacity: 0.5;\\\n
}\\\n
.emacs-mode .ace_cursor.ace_hidden{\\\n
.emacs-mode .ace_hidden-cursors .ace_cursor{\\\n
opacity: 1;\\\n
background-color: transparent;\\\n
}\\\n
......@@ -219,7 +219,7 @@ exports.handler.bindKey = function(key, command) {\n
if (!key)\n
return;\n
\n
var ckb = this.commmandKeyBinding;\n
var ckb = this.commandKeyBinding;\n
key.split("|").forEach(function(keyPart) {\n
keyPart = keyPart.toLowerCase();\n
ckb[keyPart] = command;\n
......@@ -260,7 +260,7 @@ exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {\n
data.universalArgument = false;\n
if (modifier) key = modifier + key;\n
if (data.keyChain) key = data.keyChain += " " + key;\n
var command = this.commmandKeyBinding[key];\n
var command = this.commandKeyBinding[key];\n
data.keyChain = command == "null" ? key : "";\n
if (!command) return undefined;\n
if (command === "null") return {command: "null"};\n
......@@ -1090,7 +1090,7 @@ exports.Occur = Occur;\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>36738</int> </value>
<value> <int>36745</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155554.39</string> </value>
<value> <string>ts83646622.53</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -99,6 +99,38 @@ exports.handler = {\n
data.lastEvent = "keypress";\n
}\n
},\n
updateMacCompositionHandlers: function(editor, enable) {\n
var onCompositionUpdateOverride = function(text) {\n
if (util.currentMode !== "insert") {\n
var el = this.textInput.getElement();\n
el.blur();\n
el.focus();\n
el.value = text;\n
} else {\n
this.onCompositionUpdateOrig(text);\n
}\n
};\n
var onCompositionStartOverride = function(text) {\n
if (util.currentMode === "insert") { \n
this.onCompositionStartOrig(text);\n
}\n
}\n
if (enable) {\n
if (!editor.onCompositionUpdateOrig) {\n
editor.onCompositionUpdateOrig = editor.onCompositionUpdate;\n
editor.onCompositionUpdate = onCompositionUpdateOverride;\n
editor.onCompositionStartOrig = editor.onCompositionStart;\n
editor.onCompositionStart = onCompositionStartOverride;\n
}\n
} else {\n
if (editor.onCompositionUpdateOrig) {\n
editor.onCompositionUpdate = editor.onCompositionUpdateOrig;\n
editor.onCompositionUpdateOrig = null;\n
editor.onCompositionStart = editor.onCompositionStartOrig;\n
editor.onCompositionStartOrig = null;\n
}\n
}\n
},\n
\n
handleKeyboard: function(data, hashId, key, keyCode, e) {\n
if (hashId != 0 && (key == "" || key == "\\x00"))\n
......@@ -150,12 +182,15 @@ exports.handler = {\n
if (util.currentMode !== "insert")\n
cmds.coreCommands.stop.exec(editor);\n
editor.$vimModeHandler = this;\n
\n
this.updateMacCompositionHandlers(editor, true);\n
},\n
\n
detach: function(editor) {\n
editor.removeListener("click", exports.onCursorMove);\n
util.noMode(editor);\n
util.currentMode = "normal";\n
this.updateMacCompositionHandlers(editor, false);\n
},\n
\n
actions: cmds.actions,\n
......@@ -231,6 +266,18 @@ var actions = exports.actions = {\n
case "b":\n
editor.renderer.alignCursor(null, 1);\n
break;\n
case "c":\n
editor.session.onFoldWidgetClick(range.start.row, {domEvent:{target :{}}});\n
break;\n
case "o":\n
editor.session.onFoldWidgetClick(range.start.row, {domEvent:{target :{}}});\n
break;\n
case "C":\n
editor.session.foldAll();\n
break;\n
case "O":\n
editor.session.unfold();\n
break;\n
}\n
}\n
},\n
......@@ -1744,7 +1791,7 @@ module.exports = {\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>55892</int> </value>
<value> <int>57858</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155554.49</string> </value>
<value> <string>ts83646622.79</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -63,7 +63,7 @@ var TextMode = require("./text").Mode;\n
var oop = require("../lib/oop");\n
\n
function Mode() {\n
this.$tokenizer = new Tokenizer(new Rules().getRules());\n
this.HighlightRules = Rules;\n
this.foldingRules = new FoldMode();\n
}\n
\n
......@@ -292,7 +292,7 @@ oop.inherits(FoldMode, BaseFoldMode);\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>11346</int> </value>
<value> <int>11318</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts77155560.17</string> </value>
<value> <string>ts83646621.8</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment