ace-rails-ap 4.2 → 4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ace/rails/version.rb +1 -1
  3. data/update.sh +1 -1
  4. data/vendor/assets/javascripts/ace/ace.js +661 -160
  5. data/vendor/assets/javascripts/ace/ext-beautify.js +1 -0
  6. data/vendor/assets/javascripts/ace/ext-emmet.js +314 -218
  7. data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +37 -32
  8. data/vendor/assets/javascripts/ace/ext-language_tools.js +362 -225
  9. data/vendor/assets/javascripts/ace/ext-linking.js +1 -1
  10. data/vendor/assets/javascripts/ace/ext-modelist.js +6 -2
  11. data/vendor/assets/javascripts/ace/ext-options.js +45 -34
  12. data/vendor/assets/javascripts/ace/ext-prompt.js +2764 -0
  13. data/vendor/assets/javascripts/ace/ext-rtl.js +1 -3
  14. data/vendor/assets/javascripts/ace/ext-settings_menu.js +49 -38
  15. data/vendor/assets/javascripts/ace/ext-statusbar.js +2 -2
  16. data/vendor/assets/javascripts/ace/ext-whitespace.js +4 -0
  17. data/vendor/assets/javascripts/ace/keybinding-emacs.js +1 -0
  18. data/vendor/assets/javascripts/ace/keybinding-vim.js +296 -66
  19. data/vendor/assets/javascripts/ace/mode-aql.js +102 -0
  20. data/vendor/assets/javascripts/ace/mode-autohotkey.js +3 -1
  21. data/vendor/assets/javascripts/ace/mode-cirru.js +2 -2
  22. data/vendor/assets/javascripts/ace/mode-crystal.js +642 -0
  23. data/vendor/assets/javascripts/ace/mode-csound_document.js +42 -29
  24. data/vendor/assets/javascripts/ace/mode-csound_orchestra.js +35 -25
  25. data/vendor/assets/javascripts/ace/mode-csound_score.js +29 -21
  26. data/vendor/assets/javascripts/ace/mode-fsharp.js +2 -2
  27. data/vendor/assets/javascripts/ace/mode-gherkin.js +0 -2
  28. data/vendor/assets/javascripts/ace/mode-gobstones.js +252 -94
  29. data/vendor/assets/javascripts/ace/mode-io.js +1 -7
  30. data/vendor/assets/javascripts/ace/mode-jade.js +1 -1
  31. data/vendor/assets/javascripts/ace/mode-lua.js +30 -10
  32. data/vendor/assets/javascripts/ace/mode-luapage.js +30 -10
  33. data/vendor/assets/javascripts/ace/mode-lucene.js +77 -9
  34. data/vendor/assets/javascripts/ace/mode-markdown.js +2 -1
  35. data/vendor/assets/javascripts/ace/mode-mask.js +1 -1
  36. data/vendor/assets/javascripts/ace/mode-nginx.js +298 -0
  37. data/vendor/assets/javascripts/ace/mode-nim.js +363 -0
  38. data/vendor/assets/javascripts/ace/mode-pascal.js +84 -66
  39. data/vendor/assets/javascripts/ace/mode-php.js +1 -1
  40. data/vendor/assets/javascripts/ace/mode-php_laravel_blade.js +1 -1
  41. data/vendor/assets/javascripts/ace/mode-puppet.js +3 -3
  42. data/vendor/assets/javascripts/ace/mode-slim.js +2 -1
  43. data/vendor/assets/javascripts/ace/mode-tcl.js +3 -0
  44. data/vendor/assets/javascripts/ace/mode-terraform.js +4 -4
  45. data/vendor/assets/javascripts/ace/mode-yaml.js +44 -13
  46. data/vendor/assets/javascripts/ace/mode-zeek.js +539 -0
  47. data/vendor/assets/javascripts/ace/snippets/abap.js +8 -1
  48. data/vendor/assets/javascripts/ace/snippets/abc.js +8 -1
  49. data/vendor/assets/javascripts/ace/snippets/actionscript.js +8 -1
  50. data/vendor/assets/javascripts/ace/snippets/ada.js +8 -1
  51. data/vendor/assets/javascripts/ace/snippets/apache_conf.js +8 -1
  52. data/vendor/assets/javascripts/ace/snippets/apex.js +14 -0
  53. data/vendor/assets/javascripts/ace/snippets/applescript.js +8 -1
  54. data/vendor/assets/javascripts/ace/snippets/aql.js +14 -0
  55. data/vendor/assets/javascripts/ace/snippets/asciidoc.js +8 -1
  56. data/vendor/assets/javascripts/ace/snippets/asl.js +13 -0
  57. data/vendor/assets/javascripts/ace/snippets/assembly_x86.js +8 -1
  58. data/vendor/assets/javascripts/ace/snippets/autohotkey.js +8 -1
  59. data/vendor/assets/javascripts/ace/snippets/batchfile.js +8 -1
  60. data/vendor/assets/javascripts/ace/snippets/bro.js +8 -1
  61. data/vendor/assets/javascripts/ace/snippets/c9search.js +8 -1
  62. data/vendor/assets/javascripts/ace/snippets/c_cpp.js +8 -1
  63. data/vendor/assets/javascripts/ace/snippets/cirru.js +8 -1
  64. data/vendor/assets/javascripts/ace/snippets/clojure.js +8 -1
  65. data/vendor/assets/javascripts/ace/snippets/cobol.js +8 -1
  66. data/vendor/assets/javascripts/ace/snippets/coffee.js +8 -1
  67. data/vendor/assets/javascripts/ace/snippets/coldfusion.js +8 -1
  68. data/vendor/assets/javascripts/ace/snippets/crystal.js +14 -0
  69. data/vendor/assets/javascripts/ace/snippets/csharp.js +8 -1
  70. data/vendor/assets/javascripts/ace/snippets/csound_document.js +24 -0
  71. data/vendor/assets/javascripts/ace/snippets/csound_orchestra.js +61 -0
  72. data/vendor/assets/javascripts/ace/snippets/csound_score.js +14 -0
  73. data/vendor/assets/javascripts/ace/snippets/csp.js +14 -0
  74. data/vendor/assets/javascripts/ace/snippets/css.js +8 -1
  75. data/vendor/assets/javascripts/ace/snippets/curly.js +8 -1
  76. data/vendor/assets/javascripts/ace/snippets/d.js +8 -1
  77. data/vendor/assets/javascripts/ace/snippets/dart.js +8 -1
  78. data/vendor/assets/javascripts/ace/snippets/diff.js +8 -1
  79. data/vendor/assets/javascripts/ace/snippets/django.js +8 -1
  80. data/vendor/assets/javascripts/ace/snippets/dockerfile.js +8 -1
  81. data/vendor/assets/javascripts/ace/snippets/dot.js +8 -1
  82. data/vendor/assets/javascripts/ace/snippets/drools.js +8 -1
  83. data/vendor/assets/javascripts/ace/snippets/edifact.js +254 -0
  84. data/vendor/assets/javascripts/ace/snippets/eiffel.js +8 -1
  85. data/vendor/assets/javascripts/ace/snippets/ejs.js +8 -1
  86. data/vendor/assets/javascripts/ace/snippets/elixir.js +8 -1
  87. data/vendor/assets/javascripts/ace/snippets/elm.js +8 -1
  88. data/vendor/assets/javascripts/ace/snippets/erlang.js +8 -1
  89. data/vendor/assets/javascripts/ace/snippets/forth.js +8 -1
  90. data/vendor/assets/javascripts/ace/snippets/fortran.js +8 -1
  91. data/vendor/assets/javascripts/ace/snippets/fsharp.js +14 -0
  92. data/vendor/assets/javascripts/ace/snippets/fsl.js +14 -0
  93. data/vendor/assets/javascripts/ace/snippets/ftl.js +8 -1
  94. data/vendor/assets/javascripts/ace/snippets/gcode.js +8 -1
  95. data/vendor/assets/javascripts/ace/snippets/gherkin.js +8 -1
  96. data/vendor/assets/javascripts/ace/snippets/gitignore.js +8 -1
  97. data/vendor/assets/javascripts/ace/snippets/glsl.js +8 -1
  98. data/vendor/assets/javascripts/ace/snippets/gobstones.js +1701 -24
  99. data/vendor/assets/javascripts/ace/snippets/golang.js +8 -1
  100. data/vendor/assets/javascripts/ace/snippets/graphqlschema.js +8 -1
  101. data/vendor/assets/javascripts/ace/snippets/groovy.js +8 -1
  102. data/vendor/assets/javascripts/ace/snippets/haml.js +8 -1
  103. data/vendor/assets/javascripts/ace/snippets/handlebars.js +8 -1
  104. data/vendor/assets/javascripts/ace/snippets/haskell.js +8 -1
  105. data/vendor/assets/javascripts/ace/snippets/haskell_cabal.js +8 -1
  106. data/vendor/assets/javascripts/ace/snippets/haxe.js +8 -1
  107. data/vendor/assets/javascripts/ace/snippets/hjson.js +8 -1
  108. data/vendor/assets/javascripts/ace/snippets/html.js +36 -2
  109. data/vendor/assets/javascripts/ace/snippets/html_elixir.js +8 -1
  110. data/vendor/assets/javascripts/ace/snippets/html_ruby.js +8 -1
  111. data/vendor/assets/javascripts/ace/snippets/ini.js +8 -1
  112. data/vendor/assets/javascripts/ace/snippets/io.js +8 -1
  113. data/vendor/assets/javascripts/ace/snippets/jack.js +8 -1
  114. data/vendor/assets/javascripts/ace/snippets/jade.js +8 -1
  115. data/vendor/assets/javascripts/ace/snippets/java.js +8 -1
  116. data/vendor/assets/javascripts/ace/snippets/javascript.js +8 -1
  117. data/vendor/assets/javascripts/ace/snippets/json.js +8 -1
  118. data/vendor/assets/javascripts/ace/snippets/jsoniq.js +8 -1
  119. data/vendor/assets/javascripts/ace/snippets/jsp.js +8 -1
  120. data/vendor/assets/javascripts/ace/snippets/jssm.js +14 -0
  121. data/vendor/assets/javascripts/ace/snippets/jsx.js +8 -1
  122. data/vendor/assets/javascripts/ace/snippets/julia.js +8 -1
  123. data/vendor/assets/javascripts/ace/snippets/kotlin.js +8 -1
  124. data/vendor/assets/javascripts/ace/snippets/latex.js +8 -1
  125. data/vendor/assets/javascripts/ace/snippets/less.js +8 -1
  126. data/vendor/assets/javascripts/ace/snippets/liquid.js +890 -2
  127. data/vendor/assets/javascripts/ace/snippets/lisp.js +8 -1
  128. data/vendor/assets/javascripts/ace/snippets/livescript.js +8 -1
  129. data/vendor/assets/javascripts/ace/snippets/logiql.js +8 -1
  130. data/vendor/assets/javascripts/ace/snippets/logtalk.js +14 -0
  131. data/vendor/assets/javascripts/ace/snippets/lsl.js +8 -1
  132. data/vendor/assets/javascripts/ace/snippets/lua.js +8 -1
  133. data/vendor/assets/javascripts/ace/snippets/luapage.js +8 -1
  134. data/vendor/assets/javascripts/ace/snippets/lucene.js +8 -1
  135. data/vendor/assets/javascripts/ace/snippets/makefile.js +8 -1
  136. data/vendor/assets/javascripts/ace/snippets/markdown.js +8 -1
  137. data/vendor/assets/javascripts/ace/snippets/mask.js +8 -1
  138. data/vendor/assets/javascripts/ace/snippets/matlab.js +8 -1
  139. data/vendor/assets/javascripts/ace/snippets/maze.js +8 -1
  140. data/vendor/assets/javascripts/ace/snippets/mel.js +8 -1
  141. data/vendor/assets/javascripts/ace/snippets/mixal.js +14 -0
  142. data/vendor/assets/javascripts/ace/snippets/mushcode.js +8 -1
  143. data/vendor/assets/javascripts/ace/snippets/mysql.js +8 -1
  144. data/vendor/assets/javascripts/ace/snippets/nginx.js +14 -0
  145. data/vendor/assets/javascripts/ace/snippets/nim.js +14 -0
  146. data/vendor/assets/javascripts/ace/snippets/nix.js +8 -1
  147. data/vendor/assets/javascripts/ace/snippets/nsis.js +8 -1
  148. data/vendor/assets/javascripts/ace/snippets/objectivec.js +8 -1
  149. data/vendor/assets/javascripts/ace/snippets/ocaml.js +8 -1
  150. data/vendor/assets/javascripts/ace/snippets/pascal.js +8 -1
  151. data/vendor/assets/javascripts/ace/snippets/perl.js +8 -1
  152. data/vendor/assets/javascripts/ace/snippets/perl6.js +14 -0
  153. data/vendor/assets/javascripts/ace/snippets/pgsql.js +8 -1
  154. data/vendor/assets/javascripts/ace/snippets/php.js +49 -36
  155. data/vendor/assets/javascripts/ace/snippets/php_laravel_blade.js +14 -0
  156. data/vendor/assets/javascripts/ace/snippets/pig.js +8 -1
  157. data/vendor/assets/javascripts/ace/snippets/plain_text.js +8 -1
  158. data/vendor/assets/javascripts/ace/snippets/powershell.js +8 -1
  159. data/vendor/assets/javascripts/ace/snippets/praat.js +8 -1
  160. data/vendor/assets/javascripts/ace/snippets/prolog.js +8 -1
  161. data/vendor/assets/javascripts/ace/snippets/properties.js +8 -1
  162. data/vendor/assets/javascripts/ace/snippets/protobuf.js +8 -1
  163. data/vendor/assets/javascripts/ace/snippets/puppet.js +14 -0
  164. data/vendor/assets/javascripts/ace/snippets/python.js +8 -1
  165. data/vendor/assets/javascripts/ace/snippets/r.js +8 -1
  166. data/vendor/assets/javascripts/ace/snippets/razor.js +8 -1
  167. data/vendor/assets/javascripts/ace/snippets/rdoc.js +8 -1
  168. data/vendor/assets/javascripts/ace/snippets/red.js +14 -0
  169. data/vendor/assets/javascripts/ace/snippets/redshift.js +14 -0
  170. data/vendor/assets/javascripts/ace/snippets/rhtml.js +8 -1
  171. data/vendor/assets/javascripts/ace/snippets/rst.js +8 -1
  172. data/vendor/assets/javascripts/ace/snippets/ruby.js +8 -1
  173. data/vendor/assets/javascripts/ace/snippets/rust.js +8 -1
  174. data/vendor/assets/javascripts/ace/snippets/sass.js +8 -1
  175. data/vendor/assets/javascripts/ace/snippets/scad.js +8 -1
  176. data/vendor/assets/javascripts/ace/snippets/scala.js +8 -1
  177. data/vendor/assets/javascripts/ace/snippets/scheme.js +8 -1
  178. data/vendor/assets/javascripts/ace/snippets/scss.js +8 -1
  179. data/vendor/assets/javascripts/ace/snippets/sh.js +8 -1
  180. data/vendor/assets/javascripts/ace/snippets/sjs.js +8 -1
  181. data/vendor/assets/javascripts/ace/snippets/slim.js +14 -0
  182. data/vendor/assets/javascripts/ace/snippets/smarty.js +8 -1
  183. data/vendor/assets/javascripts/ace/snippets/snippets.js +8 -1
  184. data/vendor/assets/javascripts/ace/snippets/soy_template.js +8 -1
  185. data/vendor/assets/javascripts/ace/snippets/space.js +8 -1
  186. data/vendor/assets/javascripts/ace/snippets/sparql.js +8 -1
  187. data/vendor/assets/javascripts/ace/snippets/sql.js +8 -1
  188. data/vendor/assets/javascripts/ace/snippets/sqlserver.js +8 -1
  189. data/vendor/assets/javascripts/ace/snippets/stylus.js +8 -1
  190. data/vendor/assets/javascripts/ace/snippets/svg.js +8 -1
  191. data/vendor/assets/javascripts/ace/snippets/swift.js +8 -1
  192. data/vendor/assets/javascripts/ace/snippets/tcl.js +8 -1
  193. data/vendor/assets/javascripts/ace/snippets/terraform.js +14 -0
  194. data/vendor/assets/javascripts/ace/snippets/tex.js +8 -1
  195. data/vendor/assets/javascripts/ace/snippets/text.js +8 -1
  196. data/vendor/assets/javascripts/ace/snippets/textile.js +8 -1
  197. data/vendor/assets/javascripts/ace/snippets/toml.js +8 -1
  198. data/vendor/assets/javascripts/ace/snippets/tsx.js +8 -1
  199. data/vendor/assets/javascripts/ace/snippets/turtle.js +8 -1
  200. data/vendor/assets/javascripts/ace/snippets/twig.js +8 -1
  201. data/vendor/assets/javascripts/ace/snippets/typescript.js +8 -1
  202. data/vendor/assets/javascripts/ace/snippets/vala.js +8 -1
  203. data/vendor/assets/javascripts/ace/snippets/vbscript.js +8 -1
  204. data/vendor/assets/javascripts/ace/snippets/velocity.js +8 -1
  205. data/vendor/assets/javascripts/ace/snippets/verilog.js +8 -1
  206. data/vendor/assets/javascripts/ace/snippets/vhdl.js +8 -1
  207. data/vendor/assets/javascripts/ace/snippets/visualforce.js +14 -0
  208. data/vendor/assets/javascripts/ace/snippets/wollok.js +8 -1
  209. data/vendor/assets/javascripts/ace/snippets/xml.js +8 -1
  210. data/vendor/assets/javascripts/ace/snippets/xquery.js +8 -1
  211. data/vendor/assets/javascripts/ace/snippets/yaml.js +8 -1
  212. data/vendor/assets/javascripts/ace/snippets/zeek.js +14 -0
  213. data/vendor/assets/javascripts/ace/worker-coffee.js +2 -2
  214. data/vendor/assets/javascripts/ace/worker-css.js +9 -3
  215. data/vendor/assets/javascripts/ace/worker-html.js +2 -2
  216. data/vendor/assets/javascripts/ace/worker-javascript.js +2 -2
  217. data/vendor/assets/javascripts/ace/worker-json.js +2 -2
  218. data/vendor/assets/javascripts/ace/worker-lua.js +2 -2
  219. data/vendor/assets/javascripts/ace/worker-php.js +4 -4
  220. data/vendor/assets/javascripts/ace/worker-xml.js +2 -2
  221. data/vendor/assets/javascripts/ace/worker-xquery.js +2 -2
  222. metadata +34 -16
  223. data/vendor/assets/javascripts/ace/ext-chromevox.js +0 -540
  224. data/vendor/assets/javascripts/ace/ext-old_ie.js +0 -502
  225. data/vendor/assets/javascripts/ace/mode-bash.js +0 -247
  226. data/vendor/assets/javascripts/ace/mode-lean.js +0 -281
  227. data/vendor/assets/javascripts/ace/mode-live_script.js +0 -481
  228. data/vendor/assets/javascripts/ace/mode-mips_assembler.js +0 -235
  229. data/vendor/assets/javascripts/ace/mode-mipsassembler.js +0 -196
  230. data/vendor/assets/javascripts/ace/mode-swig.js +0 -1099
  231. data/vendor/assets/javascripts/ace/snippets/lean.js +0 -7
  232. data/vendor/assets/javascripts/ace/snippets/live_script.js +0 -7
  233. data/vendor/assets/javascripts/ace/snippets/mips_assembler.js +0 -7
  234. data/vendor/assets/javascripts/ace/snippets/mipsassembler.js +0 -7
  235. data/vendor/assets/javascripts/ace/snippets/swig.js +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dacffc2e039cf928e5ce39efd8a50128a7caac2c1e6e2e10fa4ec260e6c300e7
4
- data.tar.gz: b3c5a8023f31c8c72fa8b6932e50e5994fb02e3f92c96a8a8324ddb713721d3f
3
+ metadata.gz: 77b42605762b0e7b692f3016aca72bff17969db1ea03ebf10db879e55903b42b
4
+ data.tar.gz: 61e50b5abcfec5370aa3091f9badf12c049f44ee73589878fc47c1a318c5b579
5
5
  SHA512:
6
- metadata.gz: f8374f862d20c62d63a76d39e387a9f0575e1e73b9102cc2626a3247f9ac63d9ce6d093e020bce5a50e4b9ddec18bda1ee1e0c2a017f3fa77f462478ffdfafb4
7
- data.tar.gz: db2e70838908046a7543bac88aa3eac55dcabb61c111975a506fc9c63bf15c7fe8099a80df37a1c7b5cb503e5a57c454ac7acfcb87d438f408a2ff2b7bfec189
6
+ metadata.gz: 5e0ff1f0f98d38aef4aa50840ee8ec90db0e3d00c6ae255b652edd559fbc702cb10040ef61e90f7bb1979fc85500a37ee4cb9a87cd7f0ffcf47b1e032a7bc475
7
+ data.tar.gz: 12e3168150cf86833e48877cd75fca02bbcc496cc2b638a44a4b7411126afb536ecf79c319847f9311e3dfffd5862224d168b6a8c2fc7e7df36ef2bb1af6f599
@@ -1,5 +1,5 @@
1
1
  module Ace
2
2
  module Rails
3
- VERSION = "4.2"
3
+ VERSION = "4.3"
4
4
  end
5
5
  end
data/update.sh CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/bin/bash
2
2
  cd ext/ace && git pull && cd -
3
3
  mkdir -p vendor/assets/javascripts/ace
4
- cp ext/ace/build/src/* vendor/assets/javascripts/ace
4
+ cp -r ext/ace/build/src/* vendor/assets/javascripts/ace
@@ -880,10 +880,10 @@ if (!Date.now) {
880
880
  return new Date().getTime();
881
881
  };
882
882
  }
883
- var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
883
+ var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003" +
884
884
  "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
885
885
  "\u2029\uFEFF";
886
- if (!String.prototype.trim || ws.trim()) {
886
+ if (!String.prototype.trim) {
887
887
  ws = "[" + ws + "]";
888
888
  var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
889
889
  trimEndRegexp = new RegExp(ws + ws + "*$");
@@ -976,22 +976,22 @@ exports.getOS = function() {
976
976
  return exports.OS.WINDOWS;
977
977
  }
978
978
  };
979
- if (typeof navigator != "object")
980
- return;
979
+ var _navigator = typeof navigator == "object" ? navigator : {};
981
980
 
982
- var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase();
983
- var ua = navigator.userAgent;
981
+ var os = (/mac|win|linux/i.exec(_navigator.platform) || ["other"])[0].toLowerCase();
982
+ var ua = _navigator.userAgent || "";
983
+ var appName = _navigator.appName || "";
984
984
  exports.isWin = (os == "win");
985
985
  exports.isMac = (os == "mac");
986
986
  exports.isLinux = (os == "linux");
987
987
  exports.isIE =
988
- (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0)
988
+ (appName == "Microsoft Internet Explorer" || appName.indexOf("MSAppHost") >= 0)
989
989
  ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1])
990
990
  : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie
991
991
 
992
992
  exports.isOldIE = exports.isIE && exports.isIE < 9;
993
993
  exports.isGecko = exports.isMozilla = ua.match(/ Gecko\/\d+/);
994
- exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]";
994
+ exports.isOpera = typeof opera == "object" && Object.prototype.toString.call(window.opera) == "[object Opera]";
995
995
  exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined;
996
996
 
997
997
  exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined;
@@ -1000,8 +1000,6 @@ exports.isEdge = parseFloat(ua.split(" Edge/")[1]) || undefined;
1000
1000
 
1001
1001
  exports.isAIR = ua.indexOf("AdobeAIR") >= 0;
1002
1002
 
1003
- exports.isIPad = ua.indexOf("iPad") >= 0;
1004
-
1005
1003
  exports.isAndroid = ua.indexOf("Android") >= 0;
1006
1004
 
1007
1005
  exports.isChromeOS = ua.indexOf(" CrOS ") >= 0;
@@ -1010,7 +1008,7 @@ exports.isIOS = /iPad|iPhone|iPod/.test(ua) && !window.MSStream;
1010
1008
 
1011
1009
  if (exports.isIOS) exports.isMac = true;
1012
1010
 
1013
- exports.isMobile = exports.isIPad || exports.isAndroid;
1011
+ exports.isMobile = exports.isIOS || exports.isAndroid;
1014
1012
 
1015
1013
  });
1016
1014
 
@@ -1290,7 +1288,8 @@ var oop = require("./oop");
1290
1288
  var Keys = (function() {
1291
1289
  var ret = {
1292
1290
  MODIFIER_KEYS: {
1293
- 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta'
1291
+ 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta',
1292
+ 91: 'MetaLeft', 92: 'MetaRight', 93: 'ContextMenu'
1294
1293
  },
1295
1294
 
1296
1295
  KEY_MODS: {
@@ -1475,30 +1474,6 @@ exports.capture = function(el, eventHandler, releaseCaptureHandler) {
1475
1474
  return onMouseUp;
1476
1475
  };
1477
1476
 
1478
- exports.addTouchMoveListener = function (el, callback) {
1479
- var startx, starty;
1480
- exports.addListener(el, "touchstart", function (e) {
1481
- var touches = e.touches;
1482
- var touchObj = touches[0];
1483
- startx = touchObj.clientX;
1484
- starty = touchObj.clientY;
1485
- });
1486
- exports.addListener(el, "touchmove", function (e) {
1487
- var touches = e.touches;
1488
- if (touches.length > 1) return;
1489
-
1490
- var touchObj = touches[0];
1491
-
1492
- e.wheelX = startx - touchObj.clientX;
1493
- e.wheelY = starty - touchObj.clientY;
1494
-
1495
- startx = touchObj.clientX;
1496
- starty = touchObj.clientY;
1497
-
1498
- callback(e);
1499
- });
1500
- };
1501
-
1502
1477
  exports.addMouseWheelListener = function(el, callback) {
1503
1478
  if ("onmousewheel" in el) {
1504
1479
  exports.addListener(el, "mousewheel", function(e) {
@@ -1642,9 +1617,6 @@ function normalizeCommandKeys(callback, e, keyCode) {
1642
1617
  if (keyCode in keys.MODIFIER_KEYS) {
1643
1618
  keyCode = -1;
1644
1619
  }
1645
- if (hashId & 8 && (keyCode >= 91 && keyCode <= 93)) {
1646
- keyCode = -1;
1647
- }
1648
1620
 
1649
1621
  if (!hashId && keyCode === 13) {
1650
1622
  var location = "location" in e ? e.location : e.keyLocation;
@@ -2193,13 +2165,32 @@ exports.delayedCall = function(fcn, defaultTimeout) {
2193
2165
  };
2194
2166
  });
2195
2167
 
2196
- define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/lib/keys"], function(require, exports, module) {
2168
+ define("ace/clipboard",["require","exports","module"], function(require, exports, module) {
2169
+ "use strict";
2170
+
2171
+ var $cancelT;
2172
+ module.exports = {
2173
+ lineMode: false,
2174
+ pasteCancelled: function() {
2175
+ if ($cancelT && $cancelT > Date.now() - 50)
2176
+ return true;
2177
+ return $cancelT = false;
2178
+ },
2179
+ cancel: function() {
2180
+ $cancelT = Date.now();
2181
+ }
2182
+ };
2183
+
2184
+ });
2185
+
2186
+ define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"], function(require, exports, module) {
2197
2187
  "use strict";
2198
2188
 
2199
2189
  var event = require("../lib/event");
2200
2190
  var useragent = require("../lib/useragent");
2201
2191
  var dom = require("../lib/dom");
2202
2192
  var lang = require("../lib/lang");
2193
+ var clipboard = require("../clipboard");
2203
2194
  var BROKEN_SETDATA = useragent.isChrome < 18;
2204
2195
  var USE_IE_MIME_TYPE = useragent.isIE;
2205
2196
  var HAS_FOCUS_ARGS = useragent.isChrome > 63;
@@ -2227,8 +2218,6 @@ var TextInput = function(parentNode, host) {
2227
2218
  var inComposition = false;
2228
2219
  var sendingText = false;
2229
2220
  var tempStyle = '';
2230
- var isSelectionEmpty = true;
2231
- var copyWithEmptySelection = false;
2232
2221
 
2233
2222
  if (!useragent.isMobile)
2234
2223
  text.style.fontSize = "1px";
@@ -2239,6 +2228,7 @@ var TextInput = function(parentNode, host) {
2239
2228
  var lastValue = "";
2240
2229
  var lastSelectionStart = 0;
2241
2230
  var lastSelectionEnd = 0;
2231
+ var lastRestoreEnd = 0;
2242
2232
  try { var isFocused = document.activeElement === text; } catch(e) {}
2243
2233
 
2244
2234
  event.addListener(text, "blur", function(e) {
@@ -2317,7 +2307,7 @@ var TextInput = function(parentNode, host) {
2317
2307
 
2318
2308
  var resetSelection = isIOS
2319
2309
  ? function(value) {
2320
- if (!isFocused || (copied && !value)) return;
2310
+ if (!isFocused || (copied && !value) || sendingText) return;
2321
2311
  if (!value)
2322
2312
  value = "";
2323
2313
  var newValue = "\n ab" + value + "cde fg\n";
@@ -2452,10 +2442,14 @@ var TextInput = function(parentNode, host) {
2452
2442
  }
2453
2443
  restoreStart -= i-1;
2454
2444
  restoreEnd -= i-1;
2455
- inserted = inserted.slice(0, inserted.length - i+1);
2456
- if (!fromInput && restoreStart == inserted.length && !extendLeft && !extendRight && !restoreEnd)
2445
+ var endIndex = inserted.length - i + 1;
2446
+ if (endIndex < 0) {
2447
+ extendLeft = -endIndex;
2448
+ endIndex = 0;
2449
+ }
2450
+ inserted = inserted.slice(0, endIndex);
2451
+ if (!fromInput && !inserted && !restoreStart && !extendLeft && !extendRight && !restoreEnd)
2457
2452
  return "";
2458
-
2459
2453
  sendingText = true;
2460
2454
  if (inserted && !extendLeft && !extendRight && !restoreStart && !restoreEnd || commandMode) {
2461
2455
  host.onTextInput(inserted);
@@ -2472,12 +2466,17 @@ var TextInput = function(parentNode, host) {
2472
2466
  lastValue = value;
2473
2467
  lastSelectionStart = selectionStart;
2474
2468
  lastSelectionEnd = selectionEnd;
2469
+ lastRestoreEnd = restoreEnd;
2475
2470
  return inserted;
2476
2471
  }
2477
2472
  };
2478
2473
  var onInput = function(e) {
2479
2474
  if (inComposition)
2480
2475
  return onCompositionUpdate();
2476
+ if (e && e.inputType) {
2477
+ if (e.inputType == "historyUndo") return host.execCommand("undo");
2478
+ if (e.inputType == "historyRedo") return host.execCommand("redo");
2479
+ }
2481
2480
  var data = text.value;
2482
2481
  var inserted = sendText(data, true);
2483
2482
  if (data.length > MAX_LINE_LENGTH + 100 || valueResetRegex.test(inserted))
@@ -2538,6 +2537,8 @@ var TextInput = function(parentNode, host) {
2538
2537
 
2539
2538
  var onPaste = function(e) {
2540
2539
  var data = handleClipboardData(e);
2540
+ if (clipboard.pasteCancelled())
2541
+ return;
2541
2542
  if (typeof data == "string") {
2542
2543
  if (data)
2543
2544
  host.onPaste(data, e);
@@ -2628,7 +2629,7 @@ var TextInput = function(parentNode, host) {
2628
2629
  = inComposition.context.compositionStartOffset;
2629
2630
  }
2630
2631
  inComposition.markerRange.end.column = inComposition.markerRange.start.column
2631
- + lastSelectionEnd - inComposition.selectionStart;
2632
+ + lastSelectionEnd - inComposition.selectionStart + lastRestoreEnd;
2632
2633
  }
2633
2634
  }
2634
2635
  };
@@ -2681,7 +2682,6 @@ var TextInput = function(parentNode, host) {
2681
2682
  };
2682
2683
 
2683
2684
  this.setCopyWithEmptySelection = function(value) {
2684
- copyWithEmptySelection = value;
2685
2685
  };
2686
2686
 
2687
2687
  this.onContextMenu = function(e) {
@@ -2704,16 +2704,14 @@ var TextInput = function(parentNode, host) {
2704
2704
  var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);
2705
2705
  var maxTop = rect.bottom - top - text.clientHeight -2;
2706
2706
  var move = function(e) {
2707
- text.style.left = e.clientX - left - 2 + "px";
2708
- text.style.top = Math.min(e.clientY - top - 2, maxTop) + "px";
2707
+ dom.translate(text, e.clientX - left - 2, Math.min(e.clientY - top - 2, maxTop));
2709
2708
  };
2710
2709
  move(e);
2711
2710
 
2712
2711
  if (e.type != "mousedown")
2713
2712
  return;
2714
2713
 
2715
- if (host.renderer.$keepTextAreaAtCursor)
2716
- host.renderer.$keepTextAreaAtCursor = null;
2714
+ host.renderer.$isMousePressed = true;
2717
2715
 
2718
2716
  clearTimeout(closeTimeout);
2719
2717
  if (useragent.isWin)
@@ -2729,10 +2727,9 @@ var TextInput = function(parentNode, host) {
2729
2727
  text.style.cssText = tempStyle;
2730
2728
  tempStyle = '';
2731
2729
  }
2732
- if (host.renderer.$keepTextAreaAtCursor == null) {
2733
- host.renderer.$keepTextAreaAtCursor = true;
2730
+ host.renderer.$isMousePressed = false;
2731
+ if (host.renderer.$keepTextAreaAtCursor)
2734
2732
  host.renderer.$moveTextAreaToCursor();
2735
- }
2736
2733
  }, 0);
2737
2734
  }
2738
2735
 
@@ -2767,7 +2764,7 @@ var TextInput = function(parentNode, host) {
2767
2764
  }, true);
2768
2765
  var detectArrowKeys = function(e) {
2769
2766
  if (document.activeElement !== text) return;
2770
- if (typing || inComposition) return;
2767
+ if (typing || inComposition || host.$mouseHandler.isMousePressed) return;
2771
2768
 
2772
2769
  if (copied) {
2773
2770
  return;
@@ -2777,7 +2774,6 @@ var TextInput = function(parentNode, host) {
2777
2774
 
2778
2775
  var key = null;
2779
2776
  var modifier = 0;
2780
- console.log(selectionStart, selectionEnd);
2781
2777
  if (selectionStart == 0) {
2782
2778
  key = KEYS.up;
2783
2779
  } else if (selectionStart == 1) {
@@ -2816,7 +2812,13 @@ var TextInput = function(parentNode, host) {
2816
2812
  modifier |= MODS.shift;
2817
2813
 
2818
2814
  if (key) {
2819
- host.onCommandKey(null, modifier, key);
2815
+ var result = host.onCommandKey({}, modifier, key);
2816
+ if (!result && host.commands) {
2817
+ key = KEYS.keyCodeToString(key);
2818
+ var command = host.commands.findKeyCommand(modifier, key);
2819
+ if (command)
2820
+ host.execCommand(command);
2821
+ }
2820
2822
  lastSelectionStart = selectionStart;
2821
2823
  lastSelectionEnd = selectionEnd;
2822
2824
  resetSelection("");
@@ -2850,7 +2852,6 @@ function DefaultHandlers(mouseHandler) {
2850
2852
  editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(mouseHandler));
2851
2853
  editor.setDefaultHandler("quadclick", this.onQuadClick.bind(mouseHandler));
2852
2854
  editor.setDefaultHandler("mousewheel", this.onMouseWheel.bind(mouseHandler));
2853
- editor.setDefaultHandler("touchmove", this.onTouchMove.bind(mouseHandler));
2854
2855
 
2855
2856
  var exports = ["select", "startSelect", "selectEnd", "selectAllEnd", "selectByWordsEnd",
2856
2857
  "selectByLinesEnd", "dragWait", "dragWaitEnd", "focusWait"];
@@ -3084,10 +3085,6 @@ function DefaultHandlers(mouseHandler) {
3084
3085
  return ev.stop();
3085
3086
  }
3086
3087
  };
3087
-
3088
- this.onTouchMove = function(ev) {
3089
- this.editor._emit("mousewheel", ev);
3090
- };
3091
3088
 
3092
3089
  }).call(DefaultHandlers.prototype);
3093
3090
 
@@ -3486,7 +3483,7 @@ function DragdropHandler(mouseHandler) {
3486
3483
  var dropEffect = e.dataTransfer.dropEffect;
3487
3484
  if (!dragOperation && dropEffect == "move")
3488
3485
  editor.session.remove(editor.getSelectionRange());
3489
- editor.renderer.$cursorLayer.setBlinking(true);
3486
+ editor.$resetCursorStyle();
3490
3487
  }
3491
3488
  this.editor.unsetStyle("ace_dragging");
3492
3489
  this.editor.renderer.setCursorStyle("");
@@ -3651,7 +3648,7 @@ function DragdropHandler(mouseHandler) {
3651
3648
  dragSelectionMarker = null;
3652
3649
  editor.selection.fromOrientedRange(range);
3653
3650
  if (editor.isFocused() && !isInternal)
3654
- editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly());
3651
+ editor.$resetCursorStyle();
3655
3652
  range = null;
3656
3653
  dragCursor = null;
3657
3654
  counter = 0;
@@ -3714,7 +3711,7 @@ function DragdropHandler(mouseHandler) {
3714
3711
  };
3715
3712
 
3716
3713
  this.dragReadyEnd = function(e) {
3717
- this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly());
3714
+ this.editor.$resetCursorStyle();
3718
3715
  this.editor.unsetStyle("ace_dragging");
3719
3716
  this.editor.renderer.setCursorStyle("");
3720
3717
  this.dragWaitEnd();
@@ -3790,6 +3787,313 @@ exports.DragdropHandler = DragdropHandler;
3790
3787
 
3791
3788
  });
3792
3789
 
3790
+ define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/dom"], function(require, exports, module) {
3791
+ "use strict";
3792
+
3793
+ var MouseEvent = require("./mouse_event").MouseEvent;
3794
+ var dom = require("../lib/dom");
3795
+
3796
+ exports.addTouchListeners = function(el, editor) {
3797
+ var mode = "scroll";
3798
+ var startX;
3799
+ var startY;
3800
+ var touchStartT;
3801
+ var lastT;
3802
+ var longTouchTimer;
3803
+ var animationTimer;
3804
+ var animationSteps = 0;
3805
+ var pos;
3806
+ var clickCount = 0;
3807
+ var vX = 0;
3808
+ var vY = 0;
3809
+ var pressed;
3810
+ var contextMenu;
3811
+
3812
+ function createContextMenu() {
3813
+ var clipboard = window.navigator && window.navigator.clipboard;
3814
+ var isOpen = false;
3815
+ var updateMenu = function() {
3816
+ var selected = editor.getCopyText();
3817
+ var hasUndo = editor.session.getUndoManager().hasUndo();
3818
+ contextMenu.replaceChild(
3819
+ dom.buildDom(isOpen ? ["span",
3820
+ !selected && ["span", { class: "ace_mobile-button", action: "selectall" }, "Select All"],
3821
+ selected && ["span", { class: "ace_mobile-button", action: "copy" }, "Copy"],
3822
+ selected && ["span", { class: "ace_mobile-button", action: "cut" }, "Cut"],
3823
+ clipboard && ["span", { class: "ace_mobile-button", action: "paste" }, "Paste"],
3824
+ hasUndo && ["span", { class: "ace_mobile-button", action: "undo" }, "Undo"],
3825
+ ["span", { class: "ace_mobile-button", action: "find" }, "Find"],
3826
+ ["span", { class: "ace_mobile-button", action: "openCommandPallete" }, "Pallete"]
3827
+ ] : ["span"]),
3828
+ contextMenu.firstChild
3829
+ );
3830
+ };
3831
+ var handleClick = function(e) {
3832
+ var action = e.target.getAttribute("action");
3833
+
3834
+ if (action == "more" || !isOpen) {
3835
+ isOpen = !isOpen;
3836
+ return updateMenu();
3837
+ }
3838
+ if (action == "paste") {
3839
+ clipboard.readText().then(function (text) {
3840
+ editor.execCommand(action, text);
3841
+ });
3842
+ }
3843
+ else if (action) {
3844
+ if (action == "cut" || action == "copy") {
3845
+ if (clipboard)
3846
+ clipboard.writeText(editor.getCopyText());
3847
+ else
3848
+ document.execCommand("copy");
3849
+ }
3850
+ editor.execCommand(action);
3851
+ }
3852
+ contextMenu.firstChild.style.display = "none";
3853
+ isOpen = false;
3854
+ if (action != "openCommandPallete")
3855
+ editor.focus();
3856
+ };
3857
+ contextMenu = dom.buildDom(["div",
3858
+ {
3859
+ class: "ace_mobile-menu",
3860
+ ontouchstart: function(e) {
3861
+ mode = "menu";
3862
+ e.stopPropagation();
3863
+ e.preventDefault();
3864
+ editor.textInput.focus();
3865
+ },
3866
+ ontouchend: function(e) {
3867
+ e.stopPropagation();
3868
+ e.preventDefault();
3869
+ handleClick(e);
3870
+ },
3871
+ onclick: handleClick
3872
+ },
3873
+ ["span"],
3874
+ ["span", { class: "ace_mobile-button", action: "more" }, "..."]
3875
+ ], editor.container);
3876
+ }
3877
+ function showContextMenu() {
3878
+ if (!contextMenu) createContextMenu();
3879
+ var cursor = editor.selection.cursor;
3880
+ var pagePos = editor.renderer.textToScreenCoordinates(cursor.row, cursor.column);
3881
+ var rect = editor.container.getBoundingClientRect();
3882
+ contextMenu.style.top = pagePos.pageY - rect.top - 3 + "px";
3883
+ contextMenu.style.right = "10px";
3884
+ contextMenu.style.display = "";
3885
+ contextMenu.firstChild.style.display = "none";
3886
+ editor.on("input", hideContextMenu);
3887
+ }
3888
+ function hideContextMenu(e) {
3889
+ if (contextMenu)
3890
+ contextMenu.style.display = "none";
3891
+ editor.off("input", hideContextMenu);
3892
+ }
3893
+
3894
+ function handleLongTap() {
3895
+ longTouchTimer = null;
3896
+ clearTimeout(longTouchTimer);
3897
+ var range = editor.selection.getRange();
3898
+ var inSelection = range.contains(pos.row, pos.column);
3899
+ if (range.isEmpty() || !inSelection) {
3900
+ editor.selection.moveToPosition(pos);
3901
+ editor.selection.selectWord();
3902
+ }
3903
+ mode = "wait";
3904
+ showContextMenu();
3905
+ }
3906
+ function switchToSelectionMode() {
3907
+ longTouchTimer = null;
3908
+ clearTimeout(longTouchTimer);
3909
+ editor.selection.moveToPosition(pos);
3910
+ var range = clickCount >= 2
3911
+ ? editor.selection.getLineRange(pos.row)
3912
+ : editor.session.getBracketRange(pos);
3913
+ if (range && !range.isEmpty()) {
3914
+ editor.selection.setRange(range);
3915
+ } else {
3916
+ editor.selection.selectWord();
3917
+ }
3918
+ mode = "wait";
3919
+ }
3920
+ el.addEventListener("contextmenu", function(e) {
3921
+ if (!pressed) return;
3922
+ var textarea = editor.textInput.getElement();
3923
+ textarea.focus();
3924
+ });
3925
+ el.addEventListener("touchstart", function (e) {
3926
+ var touches = e.touches;
3927
+ if (longTouchTimer || touches.length > 1) {
3928
+ clearTimeout(longTouchTimer);
3929
+ longTouchTimer = null;
3930
+ touchStartT = -1;
3931
+ mode = "zoom";
3932
+ return;
3933
+ }
3934
+
3935
+ pressed = editor.$mouseHandler.isMousePressed = true;
3936
+ var h = editor.renderer.layerConfig.lineHeight;
3937
+ var w = editor.renderer.layerConfig.lineHeight;
3938
+ var t = e.timeStamp;
3939
+ lastT = t;
3940
+ var touchObj = touches[0];
3941
+ var x = touchObj.clientX;
3942
+ var y = touchObj.clientY;
3943
+ if (Math.abs(startX - x) + Math.abs(startY - y) > h)
3944
+ touchStartT = -1;
3945
+
3946
+ startX = e.clientX = x;
3947
+ startY = e.clientY = y;
3948
+ vX = vY = 0;
3949
+
3950
+ var ev = new MouseEvent(e, editor);
3951
+ pos = ev.getDocumentPosition();
3952
+
3953
+ if (t - touchStartT < 500 && touches.length == 1 && !animationSteps) {
3954
+ clickCount++;
3955
+ e.preventDefault();
3956
+ e.button = 0;
3957
+ switchToSelectionMode();
3958
+ } else {
3959
+ clickCount = 0;
3960
+ var cursor = editor.selection.cursor;
3961
+ var anchor = editor.selection.isEmpty() ? cursor : editor.selection.anchor;
3962
+
3963
+ var cursorPos = editor.renderer.$cursorLayer.getPixelPosition(cursor, true);
3964
+ var anchorPos = editor.renderer.$cursorLayer.getPixelPosition(anchor, true);
3965
+ var rect = editor.renderer.scroller.getBoundingClientRect();
3966
+ var weightedDistance = function(x, y) {
3967
+ x = x / w;
3968
+ y = y / h - 0.75;
3969
+ return x * x + y * y;
3970
+ };
3971
+
3972
+ if (e.clientX < rect.left) {
3973
+ mode = "zoom";
3974
+ return;
3975
+ }
3976
+
3977
+ var diff1 = weightedDistance(
3978
+ e.clientX - rect.left - cursorPos.left,
3979
+ e.clientY - rect.top - cursorPos.top
3980
+ );
3981
+ var diff2 = weightedDistance(
3982
+ e.clientX - rect.left - anchorPos.left,
3983
+ e.clientY - rect.top - anchorPos.top
3984
+ );
3985
+ if (diff1 < 3.5 && diff2 < 3.5)
3986
+ mode = diff1 > diff2 ? "cursor" : "anchor";
3987
+
3988
+ if (diff2 < 3.5)
3989
+ mode = "anchor";
3990
+ else if (diff1 < 3.5)
3991
+ mode = "cursor";
3992
+ else
3993
+ mode = "scroll";
3994
+ longTouchTimer = setTimeout(handleLongTap, 450);
3995
+ }
3996
+ touchStartT = t;
3997
+ });
3998
+
3999
+ el.addEventListener("touchend", function (e) {
4000
+ pressed = editor.$mouseHandler.isMousePressed = false;
4001
+ if (animationTimer) clearInterval(animationTimer);
4002
+ if (mode == "zoom") {
4003
+ mode = "";
4004
+ animationSteps = 0;
4005
+ } else if (longTouchTimer) {
4006
+ editor.selection.moveToPosition(pos);
4007
+ animationSteps = 0;
4008
+ showContextMenu();
4009
+ } else if (mode == "scroll") {
4010
+ animate();
4011
+ e.preventDefault();
4012
+ hideContextMenu();
4013
+ } else {
4014
+ showContextMenu();
4015
+ }
4016
+ clearTimeout(longTouchTimer);
4017
+ longTouchTimer = null;
4018
+ });
4019
+ el.addEventListener("touchmove", function (e) {
4020
+ if (longTouchTimer) {
4021
+ clearTimeout(longTouchTimer);
4022
+ longTouchTimer = null;
4023
+ }
4024
+ var touches = e.touches;
4025
+ if (touches.length > 1 || mode == "zoom") return;
4026
+
4027
+ var touchObj = touches[0];
4028
+
4029
+ var wheelX = startX - touchObj.clientX;
4030
+ var wheelY = startY - touchObj.clientY;
4031
+
4032
+ if (mode == "wait") {
4033
+ if (wheelX * wheelX + wheelY * wheelY > 4)
4034
+ mode = "cursor";
4035
+ else
4036
+ return e.preventDefault();
4037
+ }
4038
+
4039
+ startX = touchObj.clientX;
4040
+ startY = touchObj.clientY;
4041
+
4042
+ e.clientX = touchObj.clientX;
4043
+ e.clientY = touchObj.clientY;
4044
+
4045
+ var t = e.timeStamp;
4046
+ var dt = t - lastT;
4047
+ lastT = t;
4048
+ if (mode == "scroll") {
4049
+ var mouseEvent = new MouseEvent(e, editor);
4050
+ mouseEvent.speed = 1;
4051
+ mouseEvent.wheelX = wheelX;
4052
+ mouseEvent.wheelY = wheelY;
4053
+ if (10 * Math.abs(wheelX) < Math.abs(wheelY)) wheelX = 0;
4054
+ if (10 * Math.abs(wheelY) < Math.abs(wheelX)) wheelY = 0;
4055
+ if (dt != 0) {
4056
+ vX = wheelX / dt;
4057
+ vY = wheelY / dt;
4058
+ }
4059
+ editor._emit("mousewheel", mouseEvent);
4060
+ if (!mouseEvent.propagationStopped) {
4061
+ vX = vY = 0;
4062
+ }
4063
+ }
4064
+ else {
4065
+ var ev = new MouseEvent(e, editor);
4066
+ var pos = ev.getDocumentPosition();
4067
+ if (mode == "cursor")
4068
+ editor.selection.moveCursorToPosition(pos);
4069
+ else if (mode == "anchor")
4070
+ editor.selection.setSelectionAnchor(pos.row, pos.column);
4071
+ editor.renderer.scrollCursorIntoView(pos);
4072
+ e.preventDefault();
4073
+ }
4074
+ });
4075
+
4076
+ function animate() {
4077
+ animationSteps += 60;
4078
+ animationTimer = setInterval(function() {
4079
+ if (animationSteps-- <= 0) {
4080
+ clearInterval(animationTimer);
4081
+ animationTimer = null;
4082
+ }
4083
+ if (Math.abs(vX) < 0.01) vX = 0;
4084
+ if (Math.abs(vY) < 0.01) vY = 0;
4085
+ if (animationSteps < 20) vX = 0.9 * vX;
4086
+ if (animationSteps < 20) vY = 0.9 * vY;
4087
+ var oldScrollTop = editor.session.getScrollTop();
4088
+ editor.renderer.scrollBy(10 * vX, 10 * vY);
4089
+ if (oldScrollTop == editor.session.getScrollTop())
4090
+ animationSteps = 0;
4091
+ }, 10);
4092
+ }
4093
+ };
4094
+
4095
+ });
4096
+
3793
4097
  define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
3794
4098
  "use strict";
3795
4099
  var dom = require("./dom");
@@ -4059,6 +4363,13 @@ var AppConfig = function() {
4059
4363
  };
4060
4364
 
4061
4365
  this.setDefaultValue = function(path, name, value) {
4366
+ if (!path) {
4367
+ for (path in this.$defaultOptions)
4368
+ if (this.$defaultOptions[path][name])
4369
+ break;
4370
+ if (!this.$defaultOptions[path][name])
4371
+ return false;
4372
+ }
4062
4373
  var opts = this.$defaultOptions[path] || (this.$defaultOptions[path] = {});
4063
4374
  if (opts[name]) {
4064
4375
  if (opts.forwardTo)
@@ -4105,7 +4416,8 @@ var options = {
4105
4416
  basePath: "",
4106
4417
  suffix: ".js",
4107
4418
  $moduleUrls: {},
4108
- loadWorkerFromBlob: true
4419
+ loadWorkerFromBlob: true,
4420
+ sharedPopups: false
4109
4421
  };
4110
4422
 
4111
4423
  exports.get = function(key) {
@@ -4116,10 +4428,10 @@ exports.get = function(key) {
4116
4428
  };
4117
4429
 
4118
4430
  exports.set = function(key, value) {
4119
- if (!options.hasOwnProperty(key))
4431
+ if (options.hasOwnProperty(key))
4432
+ options[key] = value;
4433
+ else if (this.setDefaultValue("", key, value) == false)
4120
4434
  throw new Error("Unknown config key: " + key);
4121
-
4122
- options[key] = value;
4123
4435
  };
4124
4436
 
4125
4437
  exports.all = function() {
@@ -4266,9 +4578,11 @@ function deHyphenate(str) {
4266
4578
  return str.replace(/-(.)/g, function(m, m1) { return m1.toUpperCase(); });
4267
4579
  }
4268
4580
 
4581
+ exports.version = "1.4.7";
4582
+
4269
4583
  });
4270
4584
 
4271
- define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"], function(require, exports, module) {
4585
+ define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"], function(require, exports, module) {
4272
4586
  "use strict";
4273
4587
 
4274
4588
  var event = require("../lib/event");
@@ -4277,6 +4591,7 @@ var DefaultHandlers = require("./default_handlers").DefaultHandlers;
4277
4591
  var DefaultGutterHandler = require("./default_gutter_handler").GutterHandler;
4278
4592
  var MouseEvent = require("./mouse_event").MouseEvent;
4279
4593
  var DragdropHandler = require("./dragdrop_handler").DragdropHandler;
4594
+ var addTouchListeners = require("./touch_handler").addTouchListeners;
4280
4595
  var config = require("../config");
4281
4596
 
4282
4597
  var MouseHandler = function(editor) {
@@ -4305,7 +4620,7 @@ var MouseHandler = function(editor) {
4305
4620
  editor.textInput && editor.textInput.getElement()
4306
4621
  ].filter(Boolean), [400, 300, 250], this, "onMouseEvent");
4307
4622
  event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
4308
- event.addTouchMoveListener(editor.container, this.onTouchMove.bind(this, "touchmove"));
4623
+ addTouchListeners(editor.container, editor);
4309
4624
 
4310
4625
  var gutterEl = editor.renderer.$gutter;
4311
4626
  event.addListener(gutterEl, "mousedown", this.onMouseEvent.bind(this, "guttermousedown"));
@@ -4358,14 +4673,6 @@ var MouseHandler = function(editor) {
4358
4673
  this.editor._emit(name, mouseEvent);
4359
4674
  };
4360
4675
 
4361
- this.onTouchMove = function (name, e) {
4362
- var mouseEvent = new MouseEvent(e, this.editor);
4363
- mouseEvent.speed = 1;//this.$scrollSpeed * 2;
4364
- mouseEvent.wheelX = e.wheelX;
4365
- mouseEvent.wheelY = e.wheelY;
4366
- this.editor._emit(name, mouseEvent);
4367
- };
4368
-
4369
4676
  this.setState = function(state) {
4370
4677
  this.state = state;
4371
4678
  };
@@ -4377,8 +4684,7 @@ var MouseHandler = function(editor) {
4377
4684
  this.isMousePressed = true;
4378
4685
  var editor = this.editor;
4379
4686
  var renderer = this.editor.renderer;
4380
- if (renderer.$keepTextAreaAtCursor)
4381
- renderer.$keepTextAreaAtCursor = null;
4687
+ renderer.$isMousePressed = true;
4382
4688
 
4383
4689
  var self = this;
4384
4690
  var onMouseMove = function(e) {
@@ -4399,11 +4705,9 @@ var MouseHandler = function(editor) {
4399
4705
  onCaptureInterval();
4400
4706
  self[self.state + "End"] && self[self.state + "End"](e);
4401
4707
  self.state = "";
4402
- if (renderer.$keepTextAreaAtCursor == null) {
4403
- renderer.$keepTextAreaAtCursor = true;
4708
+ self.isMousePressed = renderer.$isMousePressed = false;
4709
+ if (renderer.$keepTextAreaAtCursor)
4404
4710
  renderer.$moveTextAreaToCursor();
4405
- }
4406
- self.isMousePressed = false;
4407
4711
  self.$onCaptureMouseMove = self.releaseMouse = null;
4408
4712
  e && self.onMouseEvent("mouseup", e);
4409
4713
  editor.endOperation();
@@ -4482,7 +4786,7 @@ function FoldHandler(editor) {
4482
4786
  var target = e.domEvent && e.domEvent.target;
4483
4787
  if (target && dom.hasCssClass(target, "ace_inline_button")) {
4484
4788
  if (dom.hasCssClass(target, "ace_toggle_wrap")) {
4485
- session.setOption("wrap", true);
4789
+ session.setOption("wrap", !session.getUseWrapMode());
4486
4790
  editor.renderer.scrollCursorIntoView();
4487
4791
  }
4488
4792
  }
@@ -4639,11 +4943,11 @@ var KeyBinding = function(editor) {
4639
4943
 
4640
4944
  this.onCommandKey = function(e, hashId, keyCode) {
4641
4945
  var keyString = keyUtil.keyCodeToString(keyCode);
4642
- this.$callKeyboardHandlers(hashId, keyString, keyCode, e);
4946
+ return this.$callKeyboardHandlers(hashId, keyString, keyCode, e);
4643
4947
  };
4644
4948
 
4645
4949
  this.onTextInput = function(text) {
4646
- this.$callKeyboardHandlers(-1, text);
4950
+ return this.$callKeyboardHandlers(-1, text);
4647
4951
  };
4648
4952
 
4649
4953
  }).call(KeyBinding.prototype);
@@ -5861,7 +6165,7 @@ var Selection = function(session) {
5861
6165
 
5862
6166
  this.fromJSON = function(data) {
5863
6167
  if (data.start == undefined) {
5864
- if (this.rangeList) {
6168
+ if (this.rangeList && data.length > 1) {
5865
6169
  this.toSingleRange(data[0]);
5866
6170
  for (var i = data.length; i--; ) {
5867
6171
  var r = Range.fromPoints(data[i].start, data[i].end);
@@ -6179,7 +6483,7 @@ var Tokenizer = function(rules) {
6179
6483
  if (token.type)
6180
6484
  tokens.push(token);
6181
6485
  token = {
6182
- value: line.substring(lastIndex, lastIndex += 2000),
6486
+ value: line.substring(lastIndex, lastIndex += 500),
6183
6487
  type: "overflow"
6184
6488
  };
6185
6489
  }
@@ -6564,9 +6868,9 @@ var TokenIterator = require("../../token_iterator").TokenIterator;
6564
6868
  var lang = require("../../lib/lang");
6565
6869
 
6566
6870
  var SAFE_INSERT_IN_TOKENS =
6567
- ["text", "paren.rparen", "punctuation.operator"];
6871
+ ["text", "paren.rparen", "rparen", "paren", "punctuation.operator"];
6568
6872
  var SAFE_INSERT_BEFORE_TOKENS =
6569
- ["text", "paren.rparen", "punctuation.operator", "comment"];
6873
+ ["text", "paren.rparen", "rparen", "paren", "punctuation.operator", "comment"];
6570
6874
 
6571
6875
  var context;
6572
6876
  var contextCache = {};
@@ -6822,6 +7126,9 @@ var CstyleBehaviour = function(options) {
6822
7126
  return null; // before or after alphanumeric
6823
7127
  if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
6824
7128
  return null; // there is rightChar and it isn't closing
7129
+ var charBefore = line[cursor.column - 2];
7130
+ if (leftChar == quote && (charBefore == quote || wordRe.test(charBefore)))
7131
+ return null;
6825
7132
  pair = true;
6826
7133
  }
6827
7134
  return {
@@ -6854,6 +7161,8 @@ CstyleBehaviour.isSaneInsertion = function(editor, session) {
6854
7161
  var cursor = editor.getCursorPosition();
6855
7162
  var iterator = new TokenIterator(session, cursor.row, cursor.column);
6856
7163
  if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
7164
+ if (/[)}\]]/.test(editor.session.getLine(cursor.row)[cursor.column]))
7165
+ return true;
6857
7166
  var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
6858
7167
  if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
6859
7168
  return false;
@@ -8265,6 +8574,7 @@ var comparePoints = Range.comparePoints;
8265
8574
 
8266
8575
  var RangeList = function() {
8267
8576
  this.ranges = [];
8577
+ this.$bias = 1;
8268
8578
  };
8269
8579
 
8270
8580
  (function() {
@@ -8429,14 +8739,14 @@ var RangeList = function() {
8429
8739
  break;
8430
8740
 
8431
8741
  if (r.start.row == startRow && r.start.column >= start.column) {
8432
- if (r.start.column == start.column && this.$insertRight) {
8742
+ if (r.start.column == start.column && this.$bias <= 0) {
8433
8743
  } else {
8434
8744
  r.start.column += colDiff;
8435
8745
  r.start.row += lineDif;
8436
8746
  }
8437
8747
  }
8438
8748
  if (r.end.row == startRow && r.end.column >= start.column) {
8439
- if (r.end.column == start.column && this.$insertRight) {
8749
+ if (r.end.column == start.column && this.$bias < 0) {
8440
8750
  continue;
8441
8751
  }
8442
8752
  if (r.end.column == start.column && colDiff > 0 && i < n - 1) {
@@ -8522,10 +8832,9 @@ var RangeList = function() {
8522
8832
  exports.RangeList = RangeList;
8523
8833
  });
8524
8834
 
8525
- define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"], function(require, exports, module) {
8835
+ define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"], function(require, exports, module) {
8526
8836
  "use strict";
8527
8837
 
8528
- var Range = require("../range").Range;
8529
8838
  var RangeList = require("../range_list").RangeList;
8530
8839
  var oop = require("../lib/oop");
8531
8840
  var Fold = exports.Fold = function(range, placeholder) {
@@ -8567,9 +8876,6 @@ oop.inherits(Fold, RangeList);
8567
8876
  this.addSubFold = function(fold) {
8568
8877
  if (this.range.isEqual(fold))
8569
8878
  return;
8570
-
8571
- if (!this.range.containsRange(fold))
8572
- throw new Error("A fold can't intersect already existing fold" + fold.range + this.range);
8573
8879
  consumeRange(fold, this.start);
8574
8880
 
8575
8881
  var row = fold.start.row, column = fold.start.column;
@@ -8579,21 +8885,26 @@ oop.inherits(Fold, RangeList);
8579
8885
  break;
8580
8886
  }
8581
8887
  var afterStart = this.subFolds[i];
8888
+ var firstConsumed = 0;
8582
8889
 
8583
- if (cmp == 0)
8584
- return afterStart.addSubFold(fold);
8890
+ if (cmp == 0) {
8891
+ if (afterStart.range.containsRange(fold))
8892
+ return afterStart.addSubFold(fold);
8893
+ else
8894
+ firstConsumed = 1;
8895
+ }
8585
8896
  var row = fold.range.end.row, column = fold.range.end.column;
8586
8897
  for (var j = i, cmp = -1; j < this.subFolds.length; j++) {
8587
8898
  cmp = this.subFolds[j].range.compare(row, column);
8588
8899
  if (cmp != 1)
8589
8900
  break;
8590
8901
  }
8591
- var afterEnd = this.subFolds[j];
8592
-
8593
- if (cmp == 0)
8594
- throw new Error("A fold can't intersect already existing fold" + fold.range + this.range);
8595
-
8902
+ if (cmp == 0) j++;
8596
8903
  var consumedFolds = this.subFolds.splice(i, j - i, fold);
8904
+ var last = cmp == 0 ? consumedFolds.length - 1 : consumedFolds.length;
8905
+ for (var k = firstConsumed; k < last; k++) {
8906
+ fold.addSubFold(consumedFolds[k]);
8907
+ }
8597
8908
  fold.setFoldLine(this.foldLine);
8598
8909
 
8599
8910
  return fold;
@@ -8642,14 +8953,14 @@ function Folding() {
8642
8953
 
8643
8954
  var folds = foldLine.folds;
8644
8955
  for (var i = 0; i < folds.length; i++) {
8645
- var fold = folds[i];
8646
- if (fold.range.contains(row, column)) {
8647
- if (side == 1 && fold.range.isEnd(row, column)) {
8956
+ var range = folds[i].range;
8957
+ if (range.contains(row, column)) {
8958
+ if (side == 1 && range.isEnd(row, column) && !range.isEmpty()) {
8648
8959
  continue;
8649
- } else if (side == -1 && fold.range.isStart(row, column)) {
8960
+ } else if (side == -1 && range.isStart(row, column) && !range.isEmpty()) {
8650
8961
  continue;
8651
8962
  }
8652
- return fold;
8963
+ return folds[i];
8653
8964
  }
8654
8965
  }
8655
8966
  };
@@ -8828,9 +9139,6 @@ function Folding() {
8828
9139
  var startColumn = fold.start.column;
8829
9140
  var endRow = fold.end.row;
8830
9141
  var endColumn = fold.end.column;
8831
- if (!(startRow < endRow ||
8832
- startRow == endRow && startColumn <= endColumn - 2))
8833
- throw new Error("The range has to be at least 2 characters width");
8834
9142
 
8835
9143
  var startFold = this.getFoldAt(startRow, startColumn, 1);
8836
9144
  var endFold = this.getFoldAt(endRow, endColumn, -1);
@@ -9759,6 +10067,8 @@ EditSession.$uid = 0;
9759
10067
  this.$defaultUndoManager = {
9760
10068
  undo: function() {},
9761
10069
  redo: function() {},
10070
+ hasUndo: function() {},
10071
+ hasRedo: function() {},
9762
10072
  reset: function() {},
9763
10073
  add: function() {},
9764
10074
  addSelection: function() {},
@@ -10885,7 +11195,7 @@ EditSession.$uid = 0;
10885
11195
  }
10886
11196
  };
10887
11197
  this.getScreenTabSize = function(screenColumn) {
10888
- return this.$tabSize - screenColumn % this.$tabSize;
11198
+ return this.$tabSize - (screenColumn % this.$tabSize | 0);
10889
11199
  };
10890
11200
 
10891
11201
 
@@ -11257,12 +11567,12 @@ config.defineOptions(EditSession.prototype, "session", {
11257
11567
  tabSize: {
11258
11568
  set: function(tabSize) {
11259
11569
  tabSize = parseInt(tabSize);
11260
- if (isNaN(tabSize) || this.$tabSize === tabSize) return;
11261
-
11262
- this.$modified = true;
11263
- this.$rowLengthCache = [];
11264
- this.$tabSize = tabSize;
11265
- this._signal("changeTabSize");
11570
+ if (tabSize > 0 && this.$tabSize !== tabSize) {
11571
+ this.$modified = true;
11572
+ this.$rowLengthCache = [];
11573
+ this.$tabSize = tabSize;
11574
+ this._signal("changeTabSize");
11575
+ }
11266
11576
  },
11267
11577
  initialValue: 4,
11268
11578
  handlesSet: true
@@ -11972,23 +12282,24 @@ exports.commands = [{
11972
12282
  readOnly: true
11973
12283
  }, {
11974
12284
  name: "selectall",
12285
+ description: "Select all",
11975
12286
  bindKey: bindKey("Ctrl-A", "Command-A"),
11976
12287
  exec: function(editor) { editor.selectAll(); },
11977
12288
  readOnly: true
11978
12289
  }, {
11979
12290
  name: "centerselection",
12291
+ description: "Center selection",
11980
12292
  bindKey: bindKey(null, "Ctrl-L"),
11981
12293
  exec: function(editor) { editor.centerSelection(); },
11982
12294
  readOnly: true
11983
12295
  }, {
11984
12296
  name: "gotoline",
12297
+ description: "Go to line...",
11985
12298
  bindKey: bindKey("Ctrl-L", "Command-L"),
11986
12299
  exec: function(editor, line) {
11987
- if (typeof line !== "number")
11988
- line = parseInt(prompt("Enter line number:"), 10);
11989
- if (!isNaN(line)) {
12300
+ if (typeof line === "number" && !isNaN(line))
11990
12301
  editor.gotoLine(line);
11991
- }
12302
+ editor.prompt({ $type: "gotoLine" });
11992
12303
  },
11993
12304
  readOnly: true
11994
12305
  }, {
@@ -12021,12 +12332,14 @@ exports.commands = [{
12021
12332
  readOnly: true
12022
12333
  }, {
12023
12334
  name: "foldall",
12335
+ description: "Fold all",
12024
12336
  bindKey: bindKey(null, "Ctrl-Command-Option-0"),
12025
12337
  exec: function(editor) { editor.session.foldAll(); },
12026
12338
  scrollIntoView: "center",
12027
12339
  readOnly: true
12028
12340
  }, {
12029
12341
  name: "foldOther",
12342
+ description: "Fold other",
12030
12343
  bindKey: bindKey("Alt-0", "Command-Option-0"),
12031
12344
  exec: function(editor) {
12032
12345
  editor.session.foldAll();
@@ -12036,12 +12349,14 @@ exports.commands = [{
12036
12349
  readOnly: true
12037
12350
  }, {
12038
12351
  name: "unfoldall",
12352
+ description: "Unfold all",
12039
12353
  bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"),
12040
12354
  exec: function(editor) { editor.session.unfold(); },
12041
12355
  scrollIntoView: "center",
12042
12356
  readOnly: true
12043
12357
  }, {
12044
12358
  name: "findnext",
12359
+ description: "Find next",
12045
12360
  bindKey: bindKey("Ctrl-K", "Command-G"),
12046
12361
  exec: function(editor) { editor.findNext(); },
12047
12362
  multiSelectAction: "forEach",
@@ -12049,6 +12364,7 @@ exports.commands = [{
12049
12364
  readOnly: true
12050
12365
  }, {
12051
12366
  name: "findprevious",
12367
+ description: "Find previous",
12052
12368
  bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
12053
12369
  exec: function(editor) { editor.findPrevious(); },
12054
12370
  multiSelectAction: "forEach",
@@ -12056,6 +12372,7 @@ exports.commands = [{
12056
12372
  readOnly: true
12057
12373
  }, {
12058
12374
  name: "selectOrFindNext",
12375
+ description: "Select or find next",
12059
12376
  bindKey: bindKey("Alt-K", "Ctrl-G"),
12060
12377
  exec: function(editor) {
12061
12378
  if (editor.selection.isEmpty())
@@ -12066,6 +12383,7 @@ exports.commands = [{
12066
12383
  readOnly: true
12067
12384
  }, {
12068
12385
  name: "selectOrFindPrevious",
12386
+ description: "Select or find previous",
12069
12387
  bindKey: bindKey("Alt-Shift-K", "Ctrl-Shift-G"),
12070
12388
  exec: function(editor) {
12071
12389
  if (editor.selection.isEmpty())
@@ -12076,6 +12394,7 @@ exports.commands = [{
12076
12394
  readOnly: true
12077
12395
  }, {
12078
12396
  name: "find",
12397
+ description: "Find",
12079
12398
  bindKey: bindKey("Ctrl-F", "Command-F"),
12080
12399
  exec: function(editor) {
12081
12400
  config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor);});
@@ -12083,11 +12402,13 @@ exports.commands = [{
12083
12402
  readOnly: true
12084
12403
  }, {
12085
12404
  name: "overwrite",
12405
+ description: "Overwrite",
12086
12406
  bindKey: "Insert",
12087
12407
  exec: function(editor) { editor.toggleOverwrite(); },
12088
12408
  readOnly: true
12089
12409
  }, {
12090
12410
  name: "selecttostart",
12411
+ description: "Select to start",
12091
12412
  bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Home|Command-Shift-Up"),
12092
12413
  exec: function(editor) { editor.getSelection().selectFileStart(); },
12093
12414
  multiSelectAction: "forEach",
@@ -12096,6 +12417,7 @@ exports.commands = [{
12096
12417
  aceCommandGroup: "fileJump"
12097
12418
  }, {
12098
12419
  name: "gotostart",
12420
+ description: "Go to start",
12099
12421
  bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"),
12100
12422
  exec: function(editor) { editor.navigateFileStart(); },
12101
12423
  multiSelectAction: "forEach",
@@ -12104,6 +12426,7 @@ exports.commands = [{
12104
12426
  aceCommandGroup: "fileJump"
12105
12427
  }, {
12106
12428
  name: "selectup",
12429
+ description: "Select up",
12107
12430
  bindKey: bindKey("Shift-Up", "Shift-Up|Ctrl-Shift-P"),
12108
12431
  exec: function(editor) { editor.getSelection().selectUp(); },
12109
12432
  multiSelectAction: "forEach",
@@ -12111,6 +12434,7 @@ exports.commands = [{
12111
12434
  readOnly: true
12112
12435
  }, {
12113
12436
  name: "golineup",
12437
+ description: "Go line up",
12114
12438
  bindKey: bindKey("Up", "Up|Ctrl-P"),
12115
12439
  exec: function(editor, args) { editor.navigateUp(args.times); },
12116
12440
  multiSelectAction: "forEach",
@@ -12118,6 +12442,7 @@ exports.commands = [{
12118
12442
  readOnly: true
12119
12443
  }, {
12120
12444
  name: "selecttoend",
12445
+ description: "Select to end",
12121
12446
  bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-End|Command-Shift-Down"),
12122
12447
  exec: function(editor) { editor.getSelection().selectFileEnd(); },
12123
12448
  multiSelectAction: "forEach",
@@ -12126,6 +12451,7 @@ exports.commands = [{
12126
12451
  aceCommandGroup: "fileJump"
12127
12452
  }, {
12128
12453
  name: "gotoend",
12454
+ description: "Go to end",
12129
12455
  bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"),
12130
12456
  exec: function(editor) { editor.navigateFileEnd(); },
12131
12457
  multiSelectAction: "forEach",
@@ -12134,6 +12460,7 @@ exports.commands = [{
12134
12460
  aceCommandGroup: "fileJump"
12135
12461
  }, {
12136
12462
  name: "selectdown",
12463
+ description: "Select down",
12137
12464
  bindKey: bindKey("Shift-Down", "Shift-Down|Ctrl-Shift-N"),
12138
12465
  exec: function(editor) { editor.getSelection().selectDown(); },
12139
12466
  multiSelectAction: "forEach",
@@ -12141,6 +12468,7 @@ exports.commands = [{
12141
12468
  readOnly: true
12142
12469
  }, {
12143
12470
  name: "golinedown",
12471
+ description: "Go line down",
12144
12472
  bindKey: bindKey("Down", "Down|Ctrl-N"),
12145
12473
  exec: function(editor, args) { editor.navigateDown(args.times); },
12146
12474
  multiSelectAction: "forEach",
@@ -12148,6 +12476,7 @@ exports.commands = [{
12148
12476
  readOnly: true
12149
12477
  }, {
12150
12478
  name: "selectwordleft",
12479
+ description: "Select word left",
12151
12480
  bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
12152
12481
  exec: function(editor) { editor.getSelection().selectWordLeft(); },
12153
12482
  multiSelectAction: "forEach",
@@ -12155,6 +12484,7 @@ exports.commands = [{
12155
12484
  readOnly: true
12156
12485
  }, {
12157
12486
  name: "gotowordleft",
12487
+ description: "Go to word left",
12158
12488
  bindKey: bindKey("Ctrl-Left", "Option-Left"),
12159
12489
  exec: function(editor) { editor.navigateWordLeft(); },
12160
12490
  multiSelectAction: "forEach",
@@ -12162,6 +12492,7 @@ exports.commands = [{
12162
12492
  readOnly: true
12163
12493
  }, {
12164
12494
  name: "selecttolinestart",
12495
+ description: "Select to line start",
12165
12496
  bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left|Ctrl-Shift-A"),
12166
12497
  exec: function(editor) { editor.getSelection().selectLineStart(); },
12167
12498
  multiSelectAction: "forEach",
@@ -12169,6 +12500,7 @@ exports.commands = [{
12169
12500
  readOnly: true
12170
12501
  }, {
12171
12502
  name: "gotolinestart",
12503
+ description: "Go to line start",
12172
12504
  bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
12173
12505
  exec: function(editor) { editor.navigateLineStart(); },
12174
12506
  multiSelectAction: "forEach",
@@ -12176,6 +12508,7 @@ exports.commands = [{
12176
12508
  readOnly: true
12177
12509
  }, {
12178
12510
  name: "selectleft",
12511
+ description: "Select left",
12179
12512
  bindKey: bindKey("Shift-Left", "Shift-Left|Ctrl-Shift-B"),
12180
12513
  exec: function(editor) { editor.getSelection().selectLeft(); },
12181
12514
  multiSelectAction: "forEach",
@@ -12183,6 +12516,7 @@ exports.commands = [{
12183
12516
  readOnly: true
12184
12517
  }, {
12185
12518
  name: "gotoleft",
12519
+ description: "Go to left",
12186
12520
  bindKey: bindKey("Left", "Left|Ctrl-B"),
12187
12521
  exec: function(editor, args) { editor.navigateLeft(args.times); },
12188
12522
  multiSelectAction: "forEach",
@@ -12190,6 +12524,7 @@ exports.commands = [{
12190
12524
  readOnly: true
12191
12525
  }, {
12192
12526
  name: "selectwordright",
12527
+ description: "Select word right",
12193
12528
  bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
12194
12529
  exec: function(editor) { editor.getSelection().selectWordRight(); },
12195
12530
  multiSelectAction: "forEach",
@@ -12197,6 +12532,7 @@ exports.commands = [{
12197
12532
  readOnly: true
12198
12533
  }, {
12199
12534
  name: "gotowordright",
12535
+ description: "Go to word right",
12200
12536
  bindKey: bindKey("Ctrl-Right", "Option-Right"),
12201
12537
  exec: function(editor) { editor.navigateWordRight(); },
12202
12538
  multiSelectAction: "forEach",
@@ -12204,6 +12540,7 @@ exports.commands = [{
12204
12540
  readOnly: true
12205
12541
  }, {
12206
12542
  name: "selecttolineend",
12543
+ description: "Select to line end",
12207
12544
  bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right|Shift-End|Ctrl-Shift-E"),
12208
12545
  exec: function(editor) { editor.getSelection().selectLineEnd(); },
12209
12546
  multiSelectAction: "forEach",
@@ -12211,6 +12548,7 @@ exports.commands = [{
12211
12548
  readOnly: true
12212
12549
  }, {
12213
12550
  name: "gotolineend",
12551
+ description: "Go to line end",
12214
12552
  bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
12215
12553
  exec: function(editor) { editor.navigateLineEnd(); },
12216
12554
  multiSelectAction: "forEach",
@@ -12218,6 +12556,7 @@ exports.commands = [{
12218
12556
  readOnly: true
12219
12557
  }, {
12220
12558
  name: "selectright",
12559
+ description: "Select right",
12221
12560
  bindKey: bindKey("Shift-Right", "Shift-Right"),
12222
12561
  exec: function(editor) { editor.getSelection().selectRight(); },
12223
12562
  multiSelectAction: "forEach",
@@ -12225,6 +12564,7 @@ exports.commands = [{
12225
12564
  readOnly: true
12226
12565
  }, {
12227
12566
  name: "gotoright",
12567
+ description: "Go to right",
12228
12568
  bindKey: bindKey("Right", "Right|Ctrl-F"),
12229
12569
  exec: function(editor, args) { editor.navigateRight(args.times); },
12230
12570
  multiSelectAction: "forEach",
@@ -12232,46 +12572,55 @@ exports.commands = [{
12232
12572
  readOnly: true
12233
12573
  }, {
12234
12574
  name: "selectpagedown",
12575
+ description: "Select page down",
12235
12576
  bindKey: "Shift-PageDown",
12236
12577
  exec: function(editor) { editor.selectPageDown(); },
12237
12578
  readOnly: true
12238
12579
  }, {
12239
12580
  name: "pagedown",
12581
+ description: "Page down",
12240
12582
  bindKey: bindKey(null, "Option-PageDown"),
12241
12583
  exec: function(editor) { editor.scrollPageDown(); },
12242
12584
  readOnly: true
12243
12585
  }, {
12244
12586
  name: "gotopagedown",
12587
+ description: "Go to page down",
12245
12588
  bindKey: bindKey("PageDown", "PageDown|Ctrl-V"),
12246
12589
  exec: function(editor) { editor.gotoPageDown(); },
12247
12590
  readOnly: true
12248
12591
  }, {
12249
12592
  name: "selectpageup",
12593
+ description: "Select page up",
12250
12594
  bindKey: "Shift-PageUp",
12251
12595
  exec: function(editor) { editor.selectPageUp(); },
12252
12596
  readOnly: true
12253
12597
  }, {
12254
12598
  name: "pageup",
12599
+ description: "Page up",
12255
12600
  bindKey: bindKey(null, "Option-PageUp"),
12256
12601
  exec: function(editor) { editor.scrollPageUp(); },
12257
12602
  readOnly: true
12258
12603
  }, {
12259
12604
  name: "gotopageup",
12605
+ description: "Go to page up",
12260
12606
  bindKey: "PageUp",
12261
12607
  exec: function(editor) { editor.gotoPageUp(); },
12262
12608
  readOnly: true
12263
12609
  }, {
12264
12610
  name: "scrollup",
12611
+ description: "Scroll up",
12265
12612
  bindKey: bindKey("Ctrl-Up", null),
12266
12613
  exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); },
12267
12614
  readOnly: true
12268
12615
  }, {
12269
12616
  name: "scrolldown",
12617
+ description: "Scroll down",
12270
12618
  bindKey: bindKey("Ctrl-Down", null),
12271
12619
  exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); },
12272
12620
  readOnly: true
12273
12621
  }, {
12274
12622
  name: "selectlinestart",
12623
+ description: "Select line start",
12275
12624
  bindKey: "Shift-Home",
12276
12625
  exec: function(editor) { editor.getSelection().selectLineStart(); },
12277
12626
  multiSelectAction: "forEach",
@@ -12279,6 +12628,7 @@ exports.commands = [{
12279
12628
  readOnly: true
12280
12629
  }, {
12281
12630
  name: "selectlineend",
12631
+ description: "Select line end",
12282
12632
  bindKey: "Shift-End",
12283
12633
  exec: function(editor) { editor.getSelection().selectLineEnd(); },
12284
12634
  multiSelectAction: "forEach",
@@ -12286,30 +12636,35 @@ exports.commands = [{
12286
12636
  readOnly: true
12287
12637
  }, {
12288
12638
  name: "togglerecording",
12639
+ description: "Toggle recording",
12289
12640
  bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"),
12290
12641
  exec: function(editor) { editor.commands.toggleRecording(editor); },
12291
12642
  readOnly: true
12292
12643
  }, {
12293
12644
  name: "replaymacro",
12645
+ description: "Replay macro",
12294
12646
  bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"),
12295
12647
  exec: function(editor) { editor.commands.replay(editor); },
12296
12648
  readOnly: true
12297
12649
  }, {
12298
12650
  name: "jumptomatching",
12299
- bindKey: bindKey("Ctrl-P", "Ctrl-P"),
12651
+ description: "Jump to matching",
12652
+ bindKey: bindKey("Ctrl-\\|Ctrl-P", "Command-\\"),
12300
12653
  exec: function(editor) { editor.jumpToMatching(); },
12301
12654
  multiSelectAction: "forEach",
12302
12655
  scrollIntoView: "animate",
12303
12656
  readOnly: true
12304
12657
  }, {
12305
12658
  name: "selecttomatching",
12306
- bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"),
12659
+ description: "Select to matching",
12660
+ bindKey: bindKey("Ctrl-Shift-\\|Ctrl-Shift-P", "Command-Shift-\\"),
12307
12661
  exec: function(editor) { editor.jumpToMatching(true); },
12308
12662
  multiSelectAction: "forEach",
12309
12663
  scrollIntoView: "animate",
12310
12664
  readOnly: true
12311
12665
  }, {
12312
12666
  name: "expandToMatching",
12667
+ description: "Expand to matching",
12313
12668
  bindKey: bindKey("Ctrl-Shift-M", "Ctrl-Shift-M"),
12314
12669
  exec: function(editor) { editor.jumpToMatching(true, true); },
12315
12670
  multiSelectAction: "forEach",
@@ -12317,18 +12672,21 @@ exports.commands = [{
12317
12672
  readOnly: true
12318
12673
  }, {
12319
12674
  name: "passKeysToBrowser",
12675
+ description: "Pass keys to browser",
12320
12676
  bindKey: bindKey(null, null),
12321
12677
  exec: function() {},
12322
12678
  passEvent: true,
12323
12679
  readOnly: true
12324
12680
  }, {
12325
12681
  name: "copy",
12682
+ description: "Copy",
12326
12683
  exec: function(editor) {
12327
12684
  },
12328
12685
  readOnly: true
12329
12686
  },
12330
12687
  {
12331
12688
  name: "cut",
12689
+ description: "Cut",
12332
12690
  exec: function(editor) {
12333
12691
  var cutLine = editor.$copyWithEmptySelection && editor.selection.isEmpty();
12334
12692
  var range = cutLine ? editor.selection.getLineRange() : editor.selection.getRange();
@@ -12342,94 +12700,111 @@ exports.commands = [{
12342
12700
  multiSelectAction: "forEach"
12343
12701
  }, {
12344
12702
  name: "paste",
12703
+ description: "Paste",
12345
12704
  exec: function(editor, args) {
12346
12705
  editor.$handlePaste(args);
12347
12706
  },
12348
12707
  scrollIntoView: "cursor"
12349
12708
  }, {
12350
12709
  name: "removeline",
12710
+ description: "Remove line",
12351
12711
  bindKey: bindKey("Ctrl-D", "Command-D"),
12352
12712
  exec: function(editor) { editor.removeLines(); },
12353
12713
  scrollIntoView: "cursor",
12354
12714
  multiSelectAction: "forEachLine"
12355
12715
  }, {
12356
12716
  name: "duplicateSelection",
12717
+ description: "Duplicate selection",
12357
12718
  bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"),
12358
12719
  exec: function(editor) { editor.duplicateSelection(); },
12359
12720
  scrollIntoView: "cursor",
12360
12721
  multiSelectAction: "forEach"
12361
12722
  }, {
12362
12723
  name: "sortlines",
12724
+ description: "Sort lines",
12363
12725
  bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"),
12364
12726
  exec: function(editor) { editor.sortLines(); },
12365
12727
  scrollIntoView: "selection",
12366
12728
  multiSelectAction: "forEachLine"
12367
12729
  }, {
12368
12730
  name: "togglecomment",
12731
+ description: "Toggle comment",
12369
12732
  bindKey: bindKey("Ctrl-/", "Command-/"),
12370
12733
  exec: function(editor) { editor.toggleCommentLines(); },
12371
12734
  multiSelectAction: "forEachLine",
12372
12735
  scrollIntoView: "selectionPart"
12373
12736
  }, {
12374
12737
  name: "toggleBlockComment",
12738
+ description: "Toggle block comment",
12375
12739
  bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"),
12376
12740
  exec: function(editor) { editor.toggleBlockComment(); },
12377
12741
  multiSelectAction: "forEach",
12378
12742
  scrollIntoView: "selectionPart"
12379
12743
  }, {
12380
12744
  name: "modifyNumberUp",
12745
+ description: "Modify number up",
12381
12746
  bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"),
12382
12747
  exec: function(editor) { editor.modifyNumber(1); },
12383
12748
  scrollIntoView: "cursor",
12384
12749
  multiSelectAction: "forEach"
12385
12750
  }, {
12386
12751
  name: "modifyNumberDown",
12752
+ description: "Modify number down",
12387
12753
  bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"),
12388
12754
  exec: function(editor) { editor.modifyNumber(-1); },
12389
12755
  scrollIntoView: "cursor",
12390
12756
  multiSelectAction: "forEach"
12391
12757
  }, {
12392
12758
  name: "replace",
12759
+ description: "Replace",
12393
12760
  bindKey: bindKey("Ctrl-H", "Command-Option-F"),
12394
12761
  exec: function(editor) {
12395
12762
  config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true);});
12396
12763
  }
12397
12764
  }, {
12398
12765
  name: "undo",
12766
+ description: "Undo",
12399
12767
  bindKey: bindKey("Ctrl-Z", "Command-Z"),
12400
12768
  exec: function(editor) { editor.undo(); }
12401
12769
  }, {
12402
12770
  name: "redo",
12771
+ description: "Redo",
12403
12772
  bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"),
12404
12773
  exec: function(editor) { editor.redo(); }
12405
12774
  }, {
12406
12775
  name: "copylinesup",
12776
+ description: "Copy lines up",
12407
12777
  bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"),
12408
12778
  exec: function(editor) { editor.copyLinesUp(); },
12409
12779
  scrollIntoView: "cursor"
12410
12780
  }, {
12411
12781
  name: "movelinesup",
12782
+ description: "Move lines up",
12412
12783
  bindKey: bindKey("Alt-Up", "Option-Up"),
12413
12784
  exec: function(editor) { editor.moveLinesUp(); },
12414
12785
  scrollIntoView: "cursor"
12415
12786
  }, {
12416
12787
  name: "copylinesdown",
12788
+ description: "Copy lines down",
12417
12789
  bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"),
12418
12790
  exec: function(editor) { editor.copyLinesDown(); },
12419
12791
  scrollIntoView: "cursor"
12420
12792
  }, {
12421
12793
  name: "movelinesdown",
12794
+ description: "Move lines down",
12422
12795
  bindKey: bindKey("Alt-Down", "Option-Down"),
12423
12796
  exec: function(editor) { editor.moveLinesDown(); },
12424
12797
  scrollIntoView: "cursor"
12425
12798
  }, {
12426
12799
  name: "del",
12800
+ description: "Delete",
12427
12801
  bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"),
12428
12802
  exec: function(editor) { editor.remove("right"); },
12429
12803
  multiSelectAction: "forEach",
12430
12804
  scrollIntoView: "cursor"
12431
12805
  }, {
12432
12806
  name: "backspace",
12807
+ description: "Backspace",
12433
12808
  bindKey: bindKey(
12434
12809
  "Shift-Backspace|Backspace",
12435
12810
  "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"
@@ -12439,6 +12814,7 @@ exports.commands = [{
12439
12814
  scrollIntoView: "cursor"
12440
12815
  }, {
12441
12816
  name: "cut_or_delete",
12817
+ description: "Cut or delete",
12442
12818
  bindKey: bindKey("Shift-Delete", null),
12443
12819
  exec: function(editor) {
12444
12820
  if (editor.selection.isEmpty()) {
@@ -12451,18 +12827,21 @@ exports.commands = [{
12451
12827
  scrollIntoView: "cursor"
12452
12828
  }, {
12453
12829
  name: "removetolinestart",
12830
+ description: "Remove to line start",
12454
12831
  bindKey: bindKey("Alt-Backspace", "Command-Backspace"),
12455
12832
  exec: function(editor) { editor.removeToLineStart(); },
12456
12833
  multiSelectAction: "forEach",
12457
12834
  scrollIntoView: "cursor"
12458
12835
  }, {
12459
12836
  name: "removetolineend",
12837
+ description: "Remove to line end",
12460
12838
  bindKey: bindKey("Alt-Delete", "Ctrl-K|Command-Delete"),
12461
12839
  exec: function(editor) { editor.removeToLineEnd(); },
12462
12840
  multiSelectAction: "forEach",
12463
12841
  scrollIntoView: "cursor"
12464
12842
  }, {
12465
12843
  name: "removetolinestarthard",
12844
+ description: "Remove to line start hard",
12466
12845
  bindKey: bindKey("Ctrl-Shift-Backspace", null),
12467
12846
  exec: function(editor) {
12468
12847
  var range = editor.selection.getRange();
@@ -12473,6 +12852,7 @@ exports.commands = [{
12473
12852
  scrollIntoView: "cursor"
12474
12853
  }, {
12475
12854
  name: "removetolineendhard",
12855
+ description: "Remove to line end hard",
12476
12856
  bindKey: bindKey("Ctrl-Shift-Delete", null),
12477
12857
  exec: function(editor) {
12478
12858
  var range = editor.selection.getRange();
@@ -12483,47 +12863,55 @@ exports.commands = [{
12483
12863
  scrollIntoView: "cursor"
12484
12864
  }, {
12485
12865
  name: "removewordleft",
12866
+ description: "Remove word left",
12486
12867
  bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"),
12487
12868
  exec: function(editor) { editor.removeWordLeft(); },
12488
12869
  multiSelectAction: "forEach",
12489
12870
  scrollIntoView: "cursor"
12490
12871
  }, {
12491
12872
  name: "removewordright",
12873
+ description: "Remove word right",
12492
12874
  bindKey: bindKey("Ctrl-Delete", "Alt-Delete"),
12493
12875
  exec: function(editor) { editor.removeWordRight(); },
12494
12876
  multiSelectAction: "forEach",
12495
12877
  scrollIntoView: "cursor"
12496
12878
  }, {
12497
12879
  name: "outdent",
12880
+ description: "Outdent",
12498
12881
  bindKey: bindKey("Shift-Tab", "Shift-Tab"),
12499
12882
  exec: function(editor) { editor.blockOutdent(); },
12500
12883
  multiSelectAction: "forEach",
12501
12884
  scrollIntoView: "selectionPart"
12502
12885
  }, {
12503
12886
  name: "indent",
12887
+ description: "Indent",
12504
12888
  bindKey: bindKey("Tab", "Tab"),
12505
12889
  exec: function(editor) { editor.indent(); },
12506
12890
  multiSelectAction: "forEach",
12507
12891
  scrollIntoView: "selectionPart"
12508
12892
  }, {
12509
12893
  name: "blockoutdent",
12894
+ description: "Block outdent",
12510
12895
  bindKey: bindKey("Ctrl-[", "Ctrl-["),
12511
12896
  exec: function(editor) { editor.blockOutdent(); },
12512
12897
  multiSelectAction: "forEachLine",
12513
12898
  scrollIntoView: "selectionPart"
12514
12899
  }, {
12515
12900
  name: "blockindent",
12901
+ description: "Block indent",
12516
12902
  bindKey: bindKey("Ctrl-]", "Ctrl-]"),
12517
12903
  exec: function(editor) { editor.blockIndent(); },
12518
12904
  multiSelectAction: "forEachLine",
12519
12905
  scrollIntoView: "selectionPart"
12520
12906
  }, {
12521
12907
  name: "insertstring",
12908
+ description: "Insert string",
12522
12909
  exec: function(editor, str) { editor.insert(str); },
12523
12910
  multiSelectAction: "forEach",
12524
12911
  scrollIntoView: "cursor"
12525
12912
  }, {
12526
12913
  name: "inserttext",
12914
+ description: "Insert text",
12527
12915
  exec: function(editor, args) {
12528
12916
  editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
12529
12917
  },
@@ -12531,30 +12919,35 @@ exports.commands = [{
12531
12919
  scrollIntoView: "cursor"
12532
12920
  }, {
12533
12921
  name: "splitline",
12922
+ description: "Split line",
12534
12923
  bindKey: bindKey(null, "Ctrl-O"),
12535
12924
  exec: function(editor) { editor.splitLine(); },
12536
12925
  multiSelectAction: "forEach",
12537
12926
  scrollIntoView: "cursor"
12538
12927
  }, {
12539
12928
  name: "transposeletters",
12929
+ description: "Transpose letters",
12540
12930
  bindKey: bindKey("Alt-Shift-X", "Ctrl-T"),
12541
12931
  exec: function(editor) { editor.transposeLetters(); },
12542
12932
  multiSelectAction: function(editor) {editor.transposeSelections(1); },
12543
12933
  scrollIntoView: "cursor"
12544
12934
  }, {
12545
12935
  name: "touppercase",
12936
+ description: "To uppercase",
12546
12937
  bindKey: bindKey("Ctrl-U", "Ctrl-U"),
12547
12938
  exec: function(editor) { editor.toUpperCase(); },
12548
12939
  multiSelectAction: "forEach",
12549
12940
  scrollIntoView: "cursor"
12550
12941
  }, {
12551
12942
  name: "tolowercase",
12943
+ description: "To lowercase",
12552
12944
  bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"),
12553
12945
  exec: function(editor) { editor.toLowerCase(); },
12554
12946
  multiSelectAction: "forEach",
12555
12947
  scrollIntoView: "cursor"
12556
12948
  }, {
12557
12949
  name: "expandtoline",
12950
+ description: "Expand to line",
12558
12951
  bindKey: bindKey("Ctrl-Shift-L", "Command-Shift-L"),
12559
12952
  exec: function(editor) {
12560
12953
  var range = editor.selection.getRange();
@@ -12568,6 +12961,7 @@ exports.commands = [{
12568
12961
  readOnly: true
12569
12962
  }, {
12570
12963
  name: "joinlines",
12964
+ description: "Join lines",
12571
12965
  bindKey: bindKey(null, null),
12572
12966
  exec: function(editor) {
12573
12967
  var isBackwards = editor.selection.isBackwards();
@@ -12605,6 +12999,7 @@ exports.commands = [{
12605
12999
  readOnly: true
12606
13000
  }, {
12607
13001
  name: "invertSelection",
13002
+ description: "Invert selection",
12608
13003
  bindKey: bindKey(null, null),
12609
13004
  exec: function(editor) {
12610
13005
  var endRow = editor.session.doc.getLength() - 1;
@@ -12640,17 +13035,26 @@ exports.commands = [{
12640
13035
  },
12641
13036
  readOnly: true,
12642
13037
  scrollIntoView: "none"
13038
+ }, {
13039
+ name: "openCommandPallete",
13040
+ description: "Open command pallete",
13041
+ bindKey: bindKey("F1", "F1"),
13042
+ exec: function(editor) {
13043
+ editor.prompt({ $type: "commands" });
13044
+ },
13045
+ readOnly: true
13046
+ }, {
13047
+ name: "modeSelect",
13048
+ description: "Change language mode...",
13049
+ bindKey: bindKey(null, null),
13050
+ exec: function(editor) {
13051
+ editor.prompt({ $type: "modes" });
13052
+ },
13053
+ readOnly: true
12643
13054
  }];
12644
13055
 
12645
13056
  });
12646
13057
 
12647
- define("ace/clipboard",["require","exports","module"], function(require, exports, module) {
12648
- "use strict";
12649
-
12650
- module.exports = { lineMode: false };
12651
-
12652
- });
12653
-
12654
13058
  define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/clipboard"], function(require, exports, module) {
12655
13059
  "use strict";
12656
13060
 
@@ -13356,7 +13760,8 @@ Editor.$uid = 0;
13356
13760
  var lines = text.split(/\r\n|\r|\n/);
13357
13761
  var ranges = this.selection.rangeList.ranges;
13358
13762
 
13359
- if (lines.length > ranges.length || lines.length < 2 || !lines[1])
13763
+ var isFullLine = lines.length == 2 && (!lines[0] || !lines[1]);
13764
+ if (lines.length != ranges.length || isFullLine)
13360
13765
  return this.commands.exec("insertstring", this, text);
13361
13766
 
13362
13767
  for (var i = ranges.length; i--;) {
@@ -13417,7 +13822,7 @@ Editor.$uid = 0;
13417
13822
  var lineState = session.getState(cursor.row);
13418
13823
  var line = session.getLine(cursor.row);
13419
13824
  var shouldOutdent = mode.checkOutdent(lineState, line, text);
13420
- var end = session.insert(cursor, text);
13825
+ session.insert(cursor, text);
13421
13826
 
13422
13827
  if (transform && transform.selection) {
13423
13828
  if (transform.selection.length == 2) { // Transform relative to the current column
@@ -13475,7 +13880,7 @@ Editor.$uid = 0;
13475
13880
  };
13476
13881
 
13477
13882
  this.onCommandKey = function(e, hashId, keyCode) {
13478
- this.keyBinding.onCommandKey(e, hashId, keyCode);
13883
+ return this.keyBinding.onCommandKey(e, hashId, keyCode);
13479
13884
  };
13480
13885
  this.setOverwrite = function(overwrite) {
13481
13886
  this.session.setOverwrite(overwrite);
@@ -13859,6 +14264,7 @@ Editor.$uid = 0;
13859
14264
  ["up", "down"],
13860
14265
  ["before", "after"],
13861
14266
  ["even", "odd"],
14267
+ ["in", "out"],
13862
14268
  ["inside", "outside"],
13863
14269
  ["next", "previous"],
13864
14270
  ["increase", "decrease"],
@@ -14533,6 +14939,12 @@ Editor.$uid = 0;
14533
14939
  cursorLayer.isBlinking = !this.$readOnly && style != "wide";
14534
14940
  dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style));
14535
14941
  };
14942
+ this.prompt = function(message, options, callback) {
14943
+ var editor = this;
14944
+ config.loadModule("./ext/prompt", function (module) {
14945
+ module.prompt(editor, message, options, callback);
14946
+ });
14947
+ };
14536
14948
 
14537
14949
  }).call(Editor.prototype);
14538
14950
 
@@ -14618,6 +15030,31 @@ config.defineOptions(Editor.prototype, "editor", {
14618
15030
  relativeNumberRenderer.detach(this);
14619
15031
  }
14620
15032
  },
15033
+ placeholder: {
15034
+ set: function(message) {
15035
+ if (!this.$updatePlaceholder) {
15036
+ this.$updatePlaceholder = function() {
15037
+ var value = this.renderer.$composition || this.getValue();
15038
+ if (value && this.renderer.placeholderNode) {
15039
+ this.renderer.off("afterRender", this.$updatePlaceholder);
15040
+ dom.removeCssClass(this.container, "ace_hasPlaceholder");
15041
+ this.renderer.placeholderNode.remove();
15042
+ this.renderer.placeholderNode = null;
15043
+ } else if (!value && !this.renderer.placeholderNode) {
15044
+ this.renderer.on("afterRender", this.$updatePlaceholder);
15045
+ dom.addCssClass(this.container, "ace_hasPlaceholder");
15046
+ var el = dom.createElement("div");
15047
+ el.className = "ace_placeholder";
15048
+ el.textContent = this.$placeholder || "";
15049
+ this.renderer.placeholderNode = el;
15050
+ this.renderer.content.appendChild(this.renderer.placeholderNode);
15051
+ }
15052
+ }.bind(this);
15053
+ this.on("input", this.$updatePlaceholder);
15054
+ }
15055
+ this.$updatePlaceholder();
15056
+ }
15057
+ },
14621
15058
 
14622
15059
  hScrollBarAlwaysVisible: "renderer",
14623
15060
  vScrollBarAlwaysVisible: "renderer",
@@ -16128,6 +16565,10 @@ var Text = function(parentEl) {
16128
16565
  this.$renderLine(
16129
16566
  lineElement, row, row == foldStart ? foldLine : false
16130
16567
  );
16568
+
16569
+ if (heightChanged)
16570
+ lineElement.style.top = this.$lines.computeLineTop(row, config, this.session) + "px";
16571
+
16131
16572
  var height = (config.lineHeight * this.session.getRowLength(row)) + "px";
16132
16573
  if (lineElement.style.height != height) {
16133
16574
  heightChanged = true;
@@ -16286,17 +16727,16 @@ var Text = function(parentEl) {
16286
16727
  span.textContent = lang.stringRepeat(self.SPACE_CHAR, controlCharacter.length);
16287
16728
  valueFragment.appendChild(span);
16288
16729
  } else if (cjkSpace) {
16289
- var space = self.showInvisibles ? self.SPACE_CHAR : "";
16290
16730
  screenColumn += 1;
16291
16731
 
16292
16732
  var span = this.dom.createElement("span");
16293
16733
  span.style.width = (self.config.characterWidth * 2) + "px";
16294
16734
  span.className = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk";
16295
- span.textContent = self.showInvisibles ? self.SPACE_CHAR : "";
16735
+ span.textContent = self.showInvisibles ? self.SPACE_CHAR : cjkSpace;
16296
16736
  valueFragment.appendChild(span);
16297
16737
  } else if (cjk) {
16298
16738
  screenColumn += 1;
16299
- var span = dom.createElement("span");
16739
+ var span = this.dom.createElement("span");
16300
16740
  span.style.width = (self.config.characterWidth * 2) + "px";
16301
16741
  span.className = "ace_cjk";
16302
16742
  span.textContent = cjk;
@@ -16401,6 +16841,9 @@ var Text = function(parentEl) {
16401
16841
  }
16402
16842
  }
16403
16843
  }
16844
+
16845
+ if (splits[splits.length - 1] > this.MAX_LINE_LENGTH)
16846
+ this.$renderOverflowMessage(lineEl, screenColumn, null, "", true);
16404
16847
  };
16405
16848
 
16406
16849
  this.$renderSimpleLine = function(parent, tokens) {
@@ -16420,15 +16863,13 @@ var Text = function(parentEl) {
16420
16863
  }
16421
16864
  };
16422
16865
 
16423
- this.$renderOverflowMessage = function(parent, screenColumn, token, value) {
16424
- this.$renderToken(parent, screenColumn, token,
16866
+ this.$renderOverflowMessage = function(parent, screenColumn, token, value, hide) {
16867
+ token && this.$renderToken(parent, screenColumn, token,
16425
16868
  value.slice(0, this.MAX_LINE_LENGTH - screenColumn));
16426
16869
 
16427
16870
  var overflowEl = this.dom.createElement("span");
16428
16871
  overflowEl.className = "ace_inline_button ace_keyword ace_toggle_wrap";
16429
- overflowEl.style.position = "absolute";
16430
- overflowEl.style.right = "0";
16431
- overflowEl.textContent = "<click to see more...>";
16872
+ overflowEl.textContent = hide ? "<hide>" : "<click to see more...>";
16432
16873
 
16433
16874
  parent.appendChild(overflowEl);
16434
16875
  };
@@ -16786,6 +17227,7 @@ var ScrollBar = function(parent) {
16786
17227
 
16787
17228
  this.inner = dom.createElement("div");
16788
17229
  this.inner.className = "ace_scrollbar-inner";
17230
+ this.inner.textContent = "\xa0";
16789
17231
  this.element.appendChild(this.inner);
16790
17232
 
16791
17233
  parent.appendChild(this.element);
@@ -17428,6 +17870,9 @@ border-bottom: 1px solid;\
17428
17870
  .ace_hidden-cursors .ace_cursor {\
17429
17871
  opacity: 0.2;\
17430
17872
  }\
17873
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\
17874
+ opacity: 0;\
17875
+ }\
17431
17876
  .ace_smooth-blinking .ace_cursor {\
17432
17877
  transition: opacity 0.18s;\
17433
17878
  }\
@@ -17617,7 +18062,44 @@ background-color: rgba(255, 255, 0,0.2);\
17617
18062
  position: absolute;\
17618
18063
  z-index: 8;\
17619
18064
  }\
17620
- ";
18065
+ .ace_mobile-menu {\
18066
+ position: absolute;\
18067
+ line-height: 1.5;\
18068
+ border-radius: 4px;\
18069
+ -ms-user-select: none;\
18070
+ -moz-user-select: none;\
18071
+ -webkit-user-select: none;\
18072
+ user-select: none;\
18073
+ background: white;\
18074
+ box-shadow: 1px 3px 2px grey;\
18075
+ border: 1px solid #dcdcdc;\
18076
+ color: black;\
18077
+ }\
18078
+ .ace_dark > .ace_mobile-menu {\
18079
+ background: #333;\
18080
+ color: #ccc;\
18081
+ box-shadow: 1px 3px 2px grey;\
18082
+ border: 1px solid #444;\
18083
+ }\
18084
+ .ace_mobile-button {\
18085
+ padding: 2px;\
18086
+ cursor: pointer;\
18087
+ overflow: hidden;\
18088
+ }\
18089
+ .ace_mobile-button:hover {\
18090
+ background-color: #eee;\
18091
+ opacity:1;\
18092
+ }\
18093
+ .ace_mobile-button:active {\
18094
+ background-color: #ddd;\
18095
+ }\
18096
+ .ace_placeholder {\
18097
+ font-family: arial;\
18098
+ transform: scale(0.9);\
18099
+ opacity: 0.7;\
18100
+ transform-origin: left;\
18101
+ text-indent: 10px;\
18102
+ }";
17621
18103
 
17622
18104
  var useragent = require("./lib/useragent");
17623
18105
  var HIDE_TEXTAREA = useragent.isIE;
@@ -17742,7 +18224,7 @@ var VirtualRenderer = function(container, theme) {
17742
18224
  this.updateCharacterSize();
17743
18225
  this.setPadding(4);
17744
18226
  config.resetOptions(this);
17745
- config._emit("renderer", this);
18227
+ config._signal("renderer", this);
17746
18228
  };
17747
18229
 
17748
18230
  (function() {
@@ -17772,6 +18254,7 @@ var VirtualRenderer = function(container, theme) {
17772
18254
  this.layerConfig.lineHeight =
17773
18255
  this.lineHeight = this.$textLayer.getLineHeight();
17774
18256
  this.$updatePrintMargin();
18257
+ dom.setStyle(this.scroller.style, "line-height", this.lineHeight + "px");
17775
18258
  };
17776
18259
  this.setSession = function(session) {
17777
18260
  if (this.session)
@@ -18043,15 +18526,16 @@ var VirtualRenderer = function(container, theme) {
18043
18526
  return this.container;
18044
18527
  };
18045
18528
  this.$moveTextAreaToCursor = function() {
18529
+ if (this.$isMousePressed) return;
18046
18530
  var style = this.textarea.style;
18047
- if (!this.$keepTextAreaAtCursor) {
18531
+ var composition = this.$composition;
18532
+ if (!this.$keepTextAreaAtCursor && !composition) {
18048
18533
  dom.translate(this.textarea, -100, 0);
18049
18534
  return;
18050
18535
  }
18051
18536
  var pixelPos = this.$cursorLayer.$pixelPos;
18052
18537
  if (!pixelPos)
18053
18538
  return;
18054
- var composition = this.$composition;
18055
18539
  if (composition && composition.markerRange)
18056
18540
  pixelPos = this.$cursorLayer.getPixelPosition(composition.markerRange.start, true);
18057
18541
 
@@ -18067,6 +18551,7 @@ var VirtualRenderer = function(container, theme) {
18067
18551
  }
18068
18552
 
18069
18553
  var w = 1;
18554
+ var maxTop = this.$size.height - h;
18070
18555
  if (!composition) {
18071
18556
  posTop += this.lineHeight;
18072
18557
  }
@@ -18074,7 +18559,6 @@ var VirtualRenderer = function(container, theme) {
18074
18559
  if (composition.useTextareaForIME) {
18075
18560
  var val = this.textarea.value;
18076
18561
  w = this.characterWidth * (this.session.$getStringScreenWidth(val)[0]);
18077
- h += 2;
18078
18562
  }
18079
18563
  else {
18080
18564
  posTop += this.lineHeight + 2;
@@ -18089,7 +18573,7 @@ var VirtualRenderer = function(container, theme) {
18089
18573
 
18090
18574
  dom.setStyle(style, "height", h + "px");
18091
18575
  dom.setStyle(style, "width", w + "px");
18092
- dom.translate(this.textarea, Math.min(posLeft, this.$size.scrollerWidth - w), Math.min(posTop, this.$size.height - h));
18576
+ dom.translate(this.textarea, Math.min(posLeft, this.$size.scrollerWidth - w), Math.min(posTop, maxTop));
18093
18577
  };
18094
18578
  this.getFirstVisibleRow = function() {
18095
18579
  return this.layerConfig.firstRow;
@@ -18241,6 +18725,7 @@ var VirtualRenderer = function(container, theme) {
18241
18725
  this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left";
18242
18726
  }
18243
18727
  if (changes & this.CHANGE_FULL) {
18728
+ this.$changedLines = null;
18244
18729
  this.$textLayer.update(config);
18245
18730
  if (this.$showGutter)
18246
18731
  this.$gutterLayer.update(config);
@@ -18252,6 +18737,7 @@ var VirtualRenderer = function(container, theme) {
18252
18737
  return;
18253
18738
  }
18254
18739
  if (changes & this.CHANGE_SCROLL) {
18740
+ this.$changedLines = null;
18255
18741
  if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
18256
18742
  this.$textLayer.update(config);
18257
18743
  else
@@ -18272,6 +18758,7 @@ var VirtualRenderer = function(container, theme) {
18272
18758
  }
18273
18759
 
18274
18760
  if (changes & this.CHANGE_TEXT) {
18761
+ this.$changedLines = null;
18275
18762
  this.$textLayer.update(config);
18276
18763
  if (this.$showGutter)
18277
18764
  this.$gutterLayer.update(config);
@@ -18405,7 +18892,7 @@ var VirtualRenderer = function(container, theme) {
18405
18892
  if (this.layerConfig.width != longestLine || hScrollChanged)
18406
18893
  changes = this.CHANGE_H_SCROLL;
18407
18894
  if (hScrollChanged || vScrollChanged) {
18408
- changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);
18895
+ changes |= this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);
18409
18896
  this._signal("scrollbarVisibilityChanged");
18410
18897
  if (vScrollChanged)
18411
18898
  longestLine = this.$getLongestLine();
@@ -18725,18 +19212,16 @@ var VirtualRenderer = function(container, theme) {
18725
19212
  this.$composition = composition;
18726
19213
  if (!composition.cssText) {
18727
19214
  composition.cssText = this.textarea.style.cssText;
18728
- composition.keepTextAreaAtCursor = this.$keepTextAreaAtCursor;
18729
19215
  }
18730
19216
  composition.useTextareaForIME = this.$useTextareaForIME;
18731
19217
 
18732
19218
  if (this.$useTextareaForIME) {
18733
- this.$keepTextAreaAtCursor = true;
18734
19219
  dom.addCssClass(this.textarea, "ace_composition");
18735
19220
  this.textarea.style.cssText = "";
18736
19221
  this.$moveTextAreaToCursor();
18737
19222
  this.$cursorLayer.element.style.display = "none";
18738
19223
  }
18739
- else {
19224
+ else {
18740
19225
  composition.markerId = this.session.addMarker(composition.markerRange, "ace_composition_marker", "text");
18741
19226
  }
18742
19227
  };
@@ -18753,7 +19238,6 @@ var VirtualRenderer = function(container, theme) {
18753
19238
  this.session.removeMarker(this.$composition.markerId);
18754
19239
 
18755
19240
  dom.removeCssClass(this.textarea, "ace_composition");
18756
- this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor;
18757
19241
  this.textarea.style.cssText = this.$composition.cssText;
18758
19242
  this.$composition = null;
18759
19243
  this.$cursorLayer.element.style.display = "";
@@ -18850,6 +19334,7 @@ var VirtualRenderer = function(container, theme) {
18850
19334
  dom.importCssString(editorCss, "ace_editor.css", this.container);
18851
19335
  };
18852
19336
  this.destroy = function() {
19337
+ this.freeze();
18853
19338
  this.$fontMetrics.destroy();
18854
19339
  this.$cursorLayer.destroy();
18855
19340
  };
@@ -19575,64 +20060,75 @@ exports.onMouseDown = onMouseDown;
19575
20060
  define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"], function(require, exports, module) {
19576
20061
  exports.defaultCommands = [{
19577
20062
  name: "addCursorAbove",
20063
+ description: "Add cursor above",
19578
20064
  exec: function(editor) { editor.selectMoreLines(-1); },
19579
20065
  bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"},
19580
20066
  scrollIntoView: "cursor",
19581
20067
  readOnly: true
19582
20068
  }, {
19583
20069
  name: "addCursorBelow",
20070
+ description: "Add cursor below",
19584
20071
  exec: function(editor) { editor.selectMoreLines(1); },
19585
20072
  bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"},
19586
20073
  scrollIntoView: "cursor",
19587
20074
  readOnly: true
19588
20075
  }, {
19589
20076
  name: "addCursorAboveSkipCurrent",
20077
+ description: "Add cursor above (skip current)",
19590
20078
  exec: function(editor) { editor.selectMoreLines(-1, true); },
19591
20079
  bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"},
19592
20080
  scrollIntoView: "cursor",
19593
20081
  readOnly: true
19594
20082
  }, {
19595
20083
  name: "addCursorBelowSkipCurrent",
20084
+ description: "Add cursor below (skip current)",
19596
20085
  exec: function(editor) { editor.selectMoreLines(1, true); },
19597
20086
  bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"},
19598
20087
  scrollIntoView: "cursor",
19599
20088
  readOnly: true
19600
20089
  }, {
19601
20090
  name: "selectMoreBefore",
20091
+ description: "Select more before",
19602
20092
  exec: function(editor) { editor.selectMore(-1); },
19603
20093
  bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"},
19604
20094
  scrollIntoView: "cursor",
19605
20095
  readOnly: true
19606
20096
  }, {
19607
20097
  name: "selectMoreAfter",
20098
+ description: "Select more after",
19608
20099
  exec: function(editor) { editor.selectMore(1); },
19609
20100
  bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"},
19610
20101
  scrollIntoView: "cursor",
19611
20102
  readOnly: true
19612
20103
  }, {
19613
20104
  name: "selectNextBefore",
20105
+ description: "Select next before",
19614
20106
  exec: function(editor) { editor.selectMore(-1, true); },
19615
20107
  bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"},
19616
20108
  scrollIntoView: "cursor",
19617
20109
  readOnly: true
19618
20110
  }, {
19619
20111
  name: "selectNextAfter",
20112
+ description: "Select next after",
19620
20113
  exec: function(editor) { editor.selectMore(1, true); },
19621
20114
  bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"},
19622
20115
  scrollIntoView: "cursor",
19623
20116
  readOnly: true
19624
20117
  }, {
19625
20118
  name: "splitIntoLines",
20119
+ description: "Split into lines",
19626
20120
  exec: function(editor) { editor.multiSelect.splitIntoLines(); },
19627
20121
  bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"},
19628
20122
  readOnly: true
19629
20123
  }, {
19630
20124
  name: "alignCursors",
20125
+ description: "Align cursors",
19631
20126
  exec: function(editor) { editor.alignCursors(); },
19632
20127
  bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"},
19633
20128
  scrollIntoView: "cursor"
19634
20129
  }, {
19635
20130
  name: "findAll",
20131
+ description: "Find all",
19636
20132
  exec: function(editor) { editor.findAll(); },
19637
20133
  bindKey: {win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G"},
19638
20134
  scrollIntoView: "cursor",
@@ -19640,6 +20136,7 @@ exports.defaultCommands = [{
19640
20136
  }];
19641
20137
  exports.multiSelectCommands = [{
19642
20138
  name: "singleSelection",
20139
+ description: "Single selection",
19643
20140
  bindKey: "esc",
19644
20141
  exec: function(editor) { editor.exitMultiSelectMode(); },
19645
20142
  scrollIntoView: "cursor",
@@ -20408,6 +20905,7 @@ function MultiSelect(editor) {
20408
20905
  }
20409
20906
 
20410
20907
  function addAltCursorListeners(editor){
20908
+ if (!editor.textInput) return;
20411
20909
  var el = editor.textInput.getElement();
20412
20910
  var altCursor = false;
20413
20911
  event.addListener(el, "keydown", function(e) {
@@ -20505,8 +21003,11 @@ var FoldMode = exports.FoldMode = function() {};
20505
21003
  if (level == -1)
20506
21004
  continue;
20507
21005
 
20508
- if (level <= startLevel)
20509
- break;
21006
+ if (level <= startLevel) {
21007
+ var token = session.getTokenAt(row, 0);
21008
+ if (!token || token.type !== "string")
21009
+ break;
21010
+ }
20510
21011
 
20511
21012
  endRow = row;
20512
21013
  }
@@ -21295,7 +21796,7 @@ exports.Editor = Editor;
21295
21796
  exports.EditSession = EditSession;
21296
21797
  exports.UndoManager = UndoManager;
21297
21798
  exports.VirtualRenderer = Renderer;
21298
- exports.version = "1.4.3";
21799
+ exports.version = exports.config.version;
21299
21800
  }); (function() {
21300
21801
  window.require(["ace/ace"], function(a) {
21301
21802
  if (a) {