@openui5/sap.ui.codeeditor 1.120.7 → 1.121.0

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 (457) hide show
  1. package/.reuse/dep5 +23 -21
  2. package/THIRDPARTY.txt +6 -43
  3. package/package.json +2 -2
  4. package/src/sap/ui/codeeditor/.library +2 -2
  5. package/src/sap/ui/codeeditor/CodeEditor.js +41 -27
  6. package/src/sap/ui/codeeditor/js/ace/ace.js +16262 -16597
  7. package/src/sap/ui/codeeditor/js/ace/css/ace.css +358 -86
  8. package/src/sap/ui/codeeditor/js/ace/css/ambiance-3.png +0 -0
  9. package/src/sap/ui/codeeditor/js/ace/css/chrome-2.png +0 -0
  10. package/src/sap/ui/codeeditor/js/ace/css/cloud9_day-1.png +0 -0
  11. package/src/sap/ui/codeeditor/js/ace/css/cloud9_day-2.png +0 -0
  12. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night-1.png +0 -0
  13. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night-2.png +0 -0
  14. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night_low_color-1.png +0 -0
  15. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night_low_color-2.png +0 -0
  16. package/src/sap/ui/codeeditor/js/ace/css/clouds-2.png +0 -0
  17. package/src/sap/ui/codeeditor/js/ace/css/clouds_midnight-2.png +0 -0
  18. package/src/sap/ui/codeeditor/js/ace/css/cobalt-2.png +0 -0
  19. package/src/sap/ui/codeeditor/js/ace/css/crimson_editor-2.png +0 -0
  20. package/src/sap/ui/codeeditor/js/ace/css/dawn-2.png +0 -0
  21. package/src/sap/ui/codeeditor/js/ace/css/dracula-2.png +0 -0
  22. package/src/sap/ui/codeeditor/js/ace/css/dreamweaver-2.png +0 -0
  23. package/src/sap/ui/codeeditor/js/ace/css/eclipse-2.png +0 -0
  24. package/src/sap/ui/codeeditor/js/ace/css/github-2.png +0 -0
  25. package/src/sap/ui/codeeditor/js/ace/css/github_dark-1.png +0 -0
  26. package/src/sap/ui/codeeditor/js/ace/css/github_dark-2.png +0 -0
  27. package/src/sap/ui/codeeditor/js/ace/css/gob-2.png +0 -0
  28. package/src/sap/ui/codeeditor/js/ace/css/gruvbox-2.png +0 -0
  29. package/src/sap/ui/codeeditor/js/ace/css/gruvbox_dark_hard-1.png +0 -0
  30. package/src/sap/ui/codeeditor/js/ace/css/gruvbox_light_hard-1.png +0 -0
  31. package/src/sap/ui/codeeditor/js/ace/css/gruvbox_light_hard-2.png +0 -0
  32. package/src/sap/ui/codeeditor/js/ace/css/idle_fingers-2.png +0 -0
  33. package/src/sap/ui/codeeditor/js/ace/css/iplastic-3.png +0 -0
  34. package/src/sap/ui/codeeditor/js/ace/css/katzenmilch-1.png +0 -0
  35. package/src/sap/ui/codeeditor/js/ace/css/katzenmilch-2.png +0 -0
  36. package/src/sap/ui/codeeditor/js/ace/css/kr_theme-2.png +0 -0
  37. package/src/sap/ui/codeeditor/js/ace/css/kuroir-1.png +0 -0
  38. package/src/sap/ui/codeeditor/js/ace/css/kuroir-2.png +0 -0
  39. package/src/sap/ui/codeeditor/js/ace/css/main-10.png +0 -0
  40. package/src/sap/ui/codeeditor/js/ace/css/main-11.png +0 -0
  41. package/src/sap/ui/codeeditor/js/ace/css/main-12.png +0 -0
  42. package/src/sap/ui/codeeditor/js/ace/css/main-13.png +0 -0
  43. package/src/sap/ui/codeeditor/js/ace/css/main-14.png +0 -0
  44. package/src/sap/ui/codeeditor/js/ace/css/main-15.png +0 -0
  45. package/src/sap/ui/codeeditor/js/ace/css/main-16.png +0 -0
  46. package/src/sap/ui/codeeditor/js/ace/css/main-17.png +0 -0
  47. package/src/sap/ui/codeeditor/js/ace/css/main-18.png +0 -0
  48. package/src/sap/ui/codeeditor/js/ace/css/main-19.png +0 -0
  49. package/src/sap/ui/codeeditor/js/ace/css/main-20.png +0 -0
  50. package/src/sap/ui/codeeditor/js/ace/css/main-21.png +0 -0
  51. package/src/sap/ui/codeeditor/js/ace/css/main-22.png +0 -0
  52. package/src/sap/ui/codeeditor/js/ace/css/main-22.svg +1 -0
  53. package/src/sap/ui/codeeditor/js/ace/css/main-23.png +0 -0
  54. package/src/sap/ui/codeeditor/js/ace/css/main-5.svg +7 -0
  55. package/src/sap/ui/codeeditor/js/ace/css/main-6.svg +7 -0
  56. package/src/sap/ui/codeeditor/js/ace/css/main-7.svg +9 -0
  57. package/src/sap/ui/codeeditor/js/ace/css/main-8.png +0 -0
  58. package/src/sap/ui/codeeditor/js/ace/css/main-8.svg +4 -0
  59. package/src/sap/ui/codeeditor/js/ace/css/main-9.png +0 -0
  60. package/src/sap/ui/codeeditor/js/ace/css/main-9.svg +4 -0
  61. package/src/sap/ui/codeeditor/js/ace/css/merbivore-2.png +0 -0
  62. package/src/sap/ui/codeeditor/js/ace/css/merbivore_soft-2.png +0 -0
  63. package/src/sap/ui/codeeditor/js/ace/css/mono_industrial-2.png +0 -0
  64. package/src/sap/ui/codeeditor/js/ace/css/monokai-2.png +0 -0
  65. package/src/sap/ui/codeeditor/js/ace/css/one_dark-2.png +0 -0
  66. package/src/sap/ui/codeeditor/js/ace/css/pastel_on_dark-2.png +0 -0
  67. package/src/sap/ui/codeeditor/js/ace/css/solarized_dark-2.png +0 -0
  68. package/src/sap/ui/codeeditor/js/ace/css/solarized_light-2.png +0 -0
  69. package/src/sap/ui/codeeditor/js/ace/css/sqlserver-2.png +0 -0
  70. package/src/sap/ui/codeeditor/js/ace/css/terminal-2.png +0 -0
  71. package/src/sap/ui/codeeditor/js/ace/css/textmate-2.png +0 -0
  72. package/src/sap/ui/codeeditor/js/ace/css/theme/ambiance.css +120 -68
  73. package/src/sap/ui/codeeditor/js/ace/css/theme/chaos.css +79 -66
  74. package/src/sap/ui/codeeditor/js/ace/css/theme/chrome.css +82 -43
  75. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_day.css +160 -0
  76. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_night.css +146 -0
  77. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_night_low_color.css +134 -0
  78. package/src/sap/ui/codeeditor/js/ace/css/theme/clouds.css +59 -31
  79. package/src/sap/ui/codeeditor/js/ace/css/theme/clouds_midnight.css +60 -32
  80. package/src/sap/ui/codeeditor/js/ace/css/theme/cobalt.css +71 -38
  81. package/src/sap/ui/codeeditor/js/ace/css/theme/crimson_editor.css +79 -42
  82. package/src/sap/ui/codeeditor/js/ace/css/theme/dawn.css +70 -40
  83. package/src/sap/ui/codeeditor/js/ace/css/theme/dracula.css +95 -49
  84. package/src/sap/ui/codeeditor/js/ace/css/theme/dreamweaver.css +95 -49
  85. package/src/sap/ui/codeeditor/js/ace/css/theme/eclipse.css +62 -33
  86. package/src/sap/ui/codeeditor/js/ace/css/theme/github.css +71 -38
  87. package/src/sap/ui/codeeditor/js/ace/css/theme/github_dark.css +134 -0
  88. package/src/sap/ui/codeeditor/js/ace/css/theme/gob.css +68 -38
  89. package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox.css +54 -28
  90. package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox_dark_hard.css +163 -0
  91. package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox_light_hard.css +167 -0
  92. package/src/sap/ui/codeeditor/js/ace/css/theme/idle_fingers.css +62 -34
  93. package/src/sap/ui/codeeditor/js/ace/css/theme/iplastic.css +76 -45
  94. package/src/sap/ui/codeeditor/js/ace/css/theme/katzenmilch.css +91 -53
  95. package/src/sap/ui/codeeditor/js/ace/css/theme/kr_theme.css +67 -36
  96. package/src/sap/ui/codeeditor/js/ace/css/theme/kuroir.css +43 -17
  97. package/src/sap/ui/codeeditor/js/ace/css/theme/merbivore.css +57 -31
  98. package/src/sap/ui/codeeditor/js/ace/css/theme/merbivore_soft.css +57 -31
  99. package/src/sap/ui/codeeditor/js/ace/css/theme/mono_industrial.css +66 -36
  100. package/src/sap/ui/codeeditor/js/ace/css/theme/monokai.css +63 -35
  101. package/src/sap/ui/codeeditor/js/ace/css/theme/nord_dark.css +55 -29
  102. package/src/sap/ui/codeeditor/js/ace/css/theme/one_dark.css +88 -47
  103. package/src/sap/ui/codeeditor/js/ace/css/theme/pastel_on_dark.css +70 -38
  104. package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_dark.css +52 -28
  105. package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_light.css +55 -29
  106. package/src/sap/ui/codeeditor/js/ace/css/theme/sqlserver.css +90 -48
  107. package/src/sap/ui/codeeditor/js/ace/css/theme/terminal.css +64 -34
  108. package/src/sap/ui/codeeditor/js/ace/css/theme/textmate.css +82 -43
  109. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow.css +61 -33
  110. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night.css +61 -33
  111. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_blue.css +59 -32
  112. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_bright.css +71 -40
  113. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_eighties.css +61 -33
  114. package/src/sap/ui/codeeditor/js/ace/css/theme/twilight.css +66 -36
  115. package/src/sap/ui/codeeditor/js/ace/css/theme/vibrant_ink.css +59 -32
  116. package/src/sap/ui/codeeditor/js/ace/css/theme/xcode.css +54 -28
  117. package/src/sap/ui/codeeditor/js/ace/css/tomorrow-2.png +0 -0
  118. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night-2.png +0 -0
  119. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_blue-2.png +0 -0
  120. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_bright-2.png +0 -0
  121. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_eighties-2.png +0 -0
  122. package/src/sap/ui/codeeditor/js/ace/css/twilight-2.png +0 -0
  123. package/src/sap/ui/codeeditor/js/ace/css/vibrant_ink-2.png +0 -0
  124. package/src/sap/ui/codeeditor/js/ace/css/xcode-2.png +0 -0
  125. package/src/sap/ui/codeeditor/js/ace/ext-beautify.js +90 -91
  126. package/src/sap/ui/codeeditor/js/ace/ext-code_lens.js +39 -75
  127. package/src/sap/ui/codeeditor/js/ace/ext-command_bar.js +457 -0
  128. package/src/sap/ui/codeeditor/js/ace/ext-elastic_tabstops_lite.js +47 -97
  129. package/src/sap/ui/codeeditor/js/ace/ext-emmet.js +496 -552
  130. package/src/sap/ui/codeeditor/js/ace/ext-hardwrap.js +47 -16
  131. package/src/sap/ui/codeeditor/js/ace/ext-inline_autocomplete.js +3269 -0
  132. package/src/sap/ui/codeeditor/js/ace/ext-keybinding_menu.js +45 -105
  133. package/src/sap/ui/codeeditor/js/ace/ext-language_tools.js +1438 -1128
  134. package/src/sap/ui/codeeditor/js/ace/ext-linking.js +8 -16
  135. package/src/sap/ui/codeeditor/js/ace/ext-modelist.js +198 -185
  136. package/src/sap/ui/codeeditor/js/ace/ext-options.js +405 -443
  137. package/src/sap/ui/codeeditor/js/ace/ext-prompt.js +1682 -1508
  138. package/src/sap/ui/codeeditor/js/ace/ext-rtl.js +26 -28
  139. package/src/sap/ui/codeeditor/js/ace/ext-searchbox.js +160 -332
  140. package/src/sap/ui/codeeditor/js/ace/ext-settings_menu.js +409 -446
  141. package/src/sap/ui/codeeditor/js/ace/ext-simple_tokenizer.js +45 -0
  142. package/src/sap/ui/codeeditor/js/ace/ext-spellcheck.js +4 -10
  143. package/src/sap/ui/codeeditor/js/ace/ext-split.js +41 -63
  144. package/src/sap/ui/codeeditor/js/ace/ext-statusbar.js +19 -27
  145. package/src/sap/ui/codeeditor/js/ace/ext-themelist.js +45 -41
  146. package/src/sap/ui/codeeditor/js/ace/ext-whitespace.js +62 -83
  147. package/src/sap/ui/codeeditor/js/ace/keybinding-emacs.js +442 -551
  148. package/src/sap/ui/codeeditor/js/ace/keybinding-sublime.js +338 -351
  149. package/src/sap/ui/codeeditor/js/ace/keybinding-vim.js +5242 -4758
  150. package/src/sap/ui/codeeditor/js/ace/keybinding-vscode.js +228 -235
  151. package/src/sap/ui/codeeditor/js/ace/mode-abap.js +72 -93
  152. package/src/sap/ui/codeeditor/js/ace/mode-abc.js +136 -164
  153. package/src/sap/ui/codeeditor/js/ace/mode-actionscript.js +109 -150
  154. package/src/sap/ui/codeeditor/js/ace/mode-ada.js +45 -74
  155. package/src/sap/ui/codeeditor/js/ace/mode-alda.js +77 -109
  156. package/src/sap/ui/codeeditor/js/ace/mode-apache_conf.js +196 -241
  157. package/src/sap/ui/codeeditor/js/ace/mode-apex.js +192 -247
  158. package/src/sap/ui/codeeditor/js/ace/mode-applescript.js +56 -102
  159. package/src/sap/ui/codeeditor/js/ace/mode-aql.js +85 -95
  160. package/src/sap/ui/codeeditor/js/ace/mode-asciidoc.js +120 -158
  161. package/src/sap/ui/codeeditor/js/ace/mode-asl.js +233 -298
  162. package/src/sap/ui/codeeditor/js/ace/mode-assembly_x86.js +78 -101
  163. package/src/sap/ui/codeeditor/js/ace/mode-astro.js +2414 -0
  164. package/src/sap/ui/codeeditor/js/ace/mode-autohotkey.js +80 -116
  165. package/src/sap/ui/codeeditor/js/ace/mode-batchfile.js +74 -105
  166. package/src/sap/ui/codeeditor/js/ace/mode-bibtex.js +318 -0
  167. package/src/sap/ui/codeeditor/js/ace/mode-c9search.js +72 -115
  168. package/src/sap/ui/codeeditor/js/ace/mode-c_cpp.js +171 -257
  169. package/src/sap/ui/codeeditor/js/ace/mode-cirru.js +97 -115
  170. package/src/sap/ui/codeeditor/js/ace/mode-clojure.js +126 -119
  171. package/src/sap/ui/codeeditor/js/ace/mode-cobol.js +48 -67
  172. package/src/sap/ui/codeeditor/js/ace/mode-coffee.js +203 -268
  173. package/src/sap/ui/codeeditor/js/ace/mode-coldfusion.js +1029 -1276
  174. package/src/sap/ui/codeeditor/js/ace/mode-crystal.js +337 -393
  175. package/src/sap/ui/codeeditor/js/ace/mode-csharp.js +127 -216
  176. package/src/sap/ui/codeeditor/js/ace/mode-csound_document.js +1539 -1569
  177. package/src/sap/ui/codeeditor/js/ace/mode-csound_orchestra.js +786 -898
  178. package/src/sap/ui/codeeditor/js/ace/mode-csound_score.js +184 -237
  179. package/src/sap/ui/codeeditor/js/ace/mode-csp.js +37 -37
  180. package/src/sap/ui/codeeditor/js/ace/mode-css.js +293 -384
  181. package/src/sap/ui/codeeditor/js/ace/mode-curly.js +1019 -1262
  182. package/src/sap/ui/codeeditor/js/ace/mode-cuttlefish.js +56 -0
  183. package/src/sap/ui/codeeditor/js/ace/mode-d.js +163 -233
  184. package/src/sap/ui/codeeditor/js/ace/mode-dart.js +330 -427
  185. package/src/sap/ui/codeeditor/js/ace/mode-diff.js +20 -38
  186. package/src/sap/ui/codeeditor/js/ace/mode-django.js +1032 -1271
  187. package/src/sap/ui/codeeditor/js/ace/mode-dockerfile.js +211 -284
  188. package/src/sap/ui/codeeditor/js/ace/mode-dot.js +131 -200
  189. package/src/sap/ui/codeeditor/js/ace/mode-drools.js +408 -349
  190. package/src/sap/ui/codeeditor/js/ace/mode-edifact.js +89 -125
  191. package/src/sap/ui/codeeditor/js/ace/mode-eiffel.js +47 -62
  192. package/src/sap/ui/codeeditor/js/ace/mode-ejs.js +1350 -1666
  193. package/src/sap/ui/codeeditor/js/ace/mode-elixir.js +349 -407
  194. package/src/sap/ui/codeeditor/js/ace/mode-elm.js +136 -168
  195. package/src/sap/ui/codeeditor/js/ace/mode-erlang.js +707 -881
  196. package/src/sap/ui/codeeditor/js/ace/mode-flix.js +164 -0
  197. package/src/sap/ui/codeeditor/js/ace/mode-forth.js +128 -172
  198. package/src/sap/ui/codeeditor/js/ace/mode-fortran.js +177 -246
  199. package/src/sap/ui/codeeditor/js/ace/mode-fsharp.js +92 -131
  200. package/src/sap/ui/codeeditor/js/ace/mode-fsl.js +91 -124
  201. package/src/sap/ui/codeeditor/js/ace/mode-ftl.js +813 -748
  202. package/src/sap/ui/codeeditor/js/ace/mode-gcode.js +52 -71
  203. package/src/sap/ui/codeeditor/js/ace/mode-gherkin.js +105 -119
  204. package/src/sap/ui/codeeditor/js/ace/mode-gitignore.js +12 -22
  205. package/src/sap/ui/codeeditor/js/ace/mode-glsl.js +184 -289
  206. package/src/sap/ui/codeeditor/js/ace/mode-gobstones.js +686 -623
  207. package/src/sap/ui/codeeditor/js/ace/mode-golang.js +167 -239
  208. package/src/sap/ui/codeeditor/js/ace/mode-graphqlschema.js +48 -88
  209. package/src/sap/ui/codeeditor/js/ace/mode-groovy.js +577 -471
  210. package/src/sap/ui/codeeditor/js/ace/mode-haml.js +1062 -1026
  211. package/src/sap/ui/codeeditor/js/ace/mode-handlebars.js +1061 -1305
  212. package/src/sap/ui/codeeditor/js/ace/mode-haskell.js +199 -255
  213. package/src/sap/ui/codeeditor/js/ace/mode-haskell_cabal.js +81 -87
  214. package/src/sap/ui/codeeditor/js/ace/mode-haxe.js +111 -184
  215. package/src/sap/ui/codeeditor/js/ace/mode-hjson.js +164 -199
  216. package/src/sap/ui/codeeditor/js/ace/mode-html.js +1009 -1239
  217. package/src/sap/ui/codeeditor/js/ace/mode-html_elixir.js +1402 -1705
  218. package/src/sap/ui/codeeditor/js/ace/mode-html_ruby.js +1390 -1706
  219. package/src/sap/ui/codeeditor/js/ace/mode-ini.js +58 -82
  220. package/src/sap/ui/codeeditor/js/ace/mode-io.js +85 -123
  221. package/src/sap/ui/codeeditor/js/ace/mode-ion.js +477 -0
  222. package/src/sap/ui/codeeditor/js/ace/mode-jack.js +109 -162
  223. package/src/sap/ui/codeeditor/js/ace/mode-jade.js +1339 -1344
  224. package/src/sap/ui/codeeditor/js/ace/mode-java.js +710 -498
  225. package/src/sap/ui/codeeditor/js/ace/mode-javascript.js +441 -354
  226. package/src/sap/ui/codeeditor/js/ace/mode-jexl.js +270 -0
  227. package/src/sap/ui/codeeditor/js/ace/mode-json.js +93 -147
  228. package/src/sap/ui/codeeditor/js/ace/mode-json5.js +128 -180
  229. package/src/sap/ui/codeeditor/js/ace/mode-jsoniq.js +58 -112
  230. package/src/sap/ui/codeeditor/js/ace/mode-jsp.js +1045 -865
  231. package/src/sap/ui/codeeditor/js/ace/mode-jssm.js +158 -190
  232. package/src/sap/ui/codeeditor/js/ace/mode-jsx.js +121 -194
  233. package/src/sap/ui/codeeditor/js/ace/mode-julia.js +128 -177
  234. package/src/sap/ui/codeeditor/js/ace/mode-kotlin.js +262 -614
  235. package/src/sap/ui/codeeditor/js/ace/mode-latex.js +94 -138
  236. package/src/sap/ui/codeeditor/js/ace/mode-latte.js +1120 -1366
  237. package/src/sap/ui/codeeditor/js/ace/mode-less.js +342 -442
  238. package/src/sap/ui/codeeditor/js/ace/mode-liquid.js +1353 -1414
  239. package/src/sap/ui/codeeditor/js/ace/mode-lisp.js +65 -73
  240. package/src/sap/ui/codeeditor/js/ace/mode-livescript.js +217 -224
  241. package/src/sap/ui/codeeditor/js/ace/mode-logiql.js +97 -142
  242. package/src/sap/ui/codeeditor/js/ace/mode-logtalk.js +187 -227
  243. package/src/sap/ui/codeeditor/js/ace/mode-lsl.js +99 -155
  244. package/src/sap/ui/codeeditor/js/ace/mode-lua.js +152 -211
  245. package/src/sap/ui/codeeditor/js/ace/mode-luapage.js +1167 -1470
  246. package/src/sap/ui/codeeditor/js/ace/mode-lucene.js +25 -34
  247. package/src/sap/ui/codeeditor/js/ace/mode-makefile.js +244 -282
  248. package/src/sap/ui/codeeditor/js/ace/mode-markdown.js +1858 -2177
  249. package/src/sap/ui/codeeditor/js/ace/mode-mask.js +964 -1007
  250. package/src/sap/ui/codeeditor/js/ace/mode-matlab.js +197 -221
  251. package/src/sap/ui/codeeditor/js/ace/mode-maze.js +127 -163
  252. package/src/sap/ui/codeeditor/js/ace/mode-mediawiki.js +464 -476
  253. package/src/sap/ui/codeeditor/js/ace/mode-mel.js +90 -140
  254. package/src/sap/ui/codeeditor/js/ace/mode-mips.js +101 -134
  255. package/src/sap/ui/codeeditor/js/ace/mode-mixal.js +63 -75
  256. package/src/sap/ui/codeeditor/js/ace/mode-mushcode.js +537 -576
  257. package/src/sap/ui/codeeditor/js/ace/mode-mysql.js +85 -102
  258. package/src/sap/ui/codeeditor/js/ace/mode-nasal.js +513 -0
  259. package/src/sap/ui/codeeditor/js/ace/mode-nginx.js +119 -155
  260. package/src/sap/ui/codeeditor/js/ace/mode-nim.js +159 -197
  261. package/src/sap/ui/codeeditor/js/ace/mode-nix.js +283 -375
  262. package/src/sap/ui/codeeditor/js/ace/mode-nsis.js +139 -172
  263. package/src/sap/ui/codeeditor/js/ace/mode-nunjucks.js +1138 -1378
  264. package/src/sap/ui/codeeditor/js/ace/mode-objectivec.js +400 -514
  265. package/src/sap/ui/codeeditor/js/ace/mode-ocaml.js +77 -120
  266. package/src/sap/ui/codeeditor/js/ace/mode-odin.js +449 -0
  267. package/src/sap/ui/codeeditor/js/ace/mode-partiql.js +750 -0
  268. package/src/sap/ui/codeeditor/js/ace/mode-pascal.js +28 -47
  269. package/src/sap/ui/codeeditor/js/ace/mode-perl.js +122 -185
  270. package/src/sap/ui/codeeditor/js/ace/mode-pgsql.js +974 -851
  271. package/src/sap/ui/codeeditor/js/ace/mode-php.js +2282 -1502
  272. package/src/sap/ui/codeeditor/js/ace/mode-php_laravel_blade.js +2463 -1696
  273. package/src/sap/ui/codeeditor/js/ace/mode-pig.js +133 -165
  274. package/src/sap/ui/codeeditor/js/ace/mode-plain_text.js +5 -10
  275. package/src/sap/ui/codeeditor/js/ace/mode-plsql.js +268 -0
  276. package/src/sap/ui/codeeditor/js/ace/mode-powershell.js +332 -183
  277. package/src/sap/ui/codeeditor/js/ace/mode-praat.js +168 -234
  278. package/src/sap/ui/codeeditor/js/ace/mode-prisma.js +292 -324
  279. package/src/sap/ui/codeeditor/js/ace/mode-prolog.js +180 -246
  280. package/src/sap/ui/codeeditor/js/ace/mode-properties.js +26 -37
  281. package/src/sap/ui/codeeditor/js/ace/mode-protobuf.js +232 -327
  282. package/src/sap/ui/codeeditor/js/ace/mode-prql.js +320 -0
  283. package/src/sap/ui/codeeditor/js/ace/mode-puppet.js +68 -120
  284. package/src/sap/ui/codeeditor/js/ace/mode-python.js +338 -370
  285. package/src/sap/ui/codeeditor/js/ace/mode-qml.js +244 -279
  286. package/src/sap/ui/codeeditor/js/ace/mode-r.js +295 -220
  287. package/src/sap/ui/codeeditor/js/ace/mode-raku.js +356 -433
  288. package/src/sap/ui/codeeditor/js/ace/mode-razor.js +1130 -1374
  289. package/src/sap/ui/codeeditor/js/ace/mode-rdoc.js +214 -171
  290. package/src/sap/ui/codeeditor/js/ace/mode-red.js +212 -274
  291. package/src/sap/ui/codeeditor/js/ace/mode-redshift.js +181 -220
  292. package/src/sap/ui/codeeditor/js/ace/mode-rhtml.js +1325 -1443
  293. package/src/sap/ui/codeeditor/js/ace/mode-robot.js +168 -0
  294. package/src/sap/ui/codeeditor/js/ace/mode-rst.js +217 -229
  295. package/src/sap/ui/codeeditor/js/ace/mode-ruby.js +338 -420
  296. package/src/sap/ui/codeeditor/js/ace/mode-rust.js +258 -155
  297. package/src/sap/ui/codeeditor/js/ace/mode-sac.js +349 -0
  298. package/src/sap/ui/codeeditor/js/ace/mode-sass.js +257 -309
  299. package/src/sap/ui/codeeditor/js/ace/mode-scad.js +127 -191
  300. package/src/sap/ui/codeeditor/js/ace/mode-scala.js +572 -468
  301. package/src/sap/ui/codeeditor/js/ace/mode-scheme.js +104 -126
  302. package/src/sap/ui/codeeditor/js/ace/mode-scrypt.js +181 -228
  303. package/src/sap/ui/codeeditor/js/ace/mode-scss.js +364 -472
  304. package/src/sap/ui/codeeditor/js/ace/mode-sh.js +204 -266
  305. package/src/sap/ui/codeeditor/js/ace/mode-sjs.js +477 -405
  306. package/src/sap/ui/codeeditor/js/ace/mode-slim.js +2631 -3161
  307. package/src/sap/ui/codeeditor/js/ace/mode-smarty.js +1075 -1334
  308. package/src/sap/ui/codeeditor/js/ace/mode-smithy.js +276 -327
  309. package/src/sap/ui/codeeditor/js/ace/mode-snippets.js +78 -102
  310. package/src/sap/ui/codeeditor/js/ace/mode-soy_template.js +1251 -1548
  311. package/src/sap/ui/codeeditor/js/ace/mode-space.js +47 -63
  312. package/src/sap/ui/codeeditor/js/ace/mode-sparql.js +139 -171
  313. package/src/sap/ui/codeeditor/js/ace/mode-sql.js +77 -133
  314. package/src/sap/ui/codeeditor/js/ace/mode-sqlserver.js +138 -192
  315. package/src/sap/ui/codeeditor/js/ace/mode-stylus.js +306 -338
  316. package/src/sap/ui/codeeditor/js/ace/mode-svg.js +642 -794
  317. package/src/sap/ui/codeeditor/js/ace/mode-swift.js +96 -150
  318. package/src/sap/ui/codeeditor/js/ace/mode-tcl.js +151 -200
  319. package/src/sap/ui/codeeditor/js/ace/mode-terraform.js +78 -132
  320. package/src/sap/ui/codeeditor/js/ace/mode-tex.js +148 -96
  321. package/src/sap/ui/codeeditor/js/ace/mode-textile.js +45 -70
  322. package/src/sap/ui/codeeditor/js/ace/mode-toml.js +63 -87
  323. package/src/sap/ui/codeeditor/js/ace/mode-tsx.js +462 -384
  324. package/src/sap/ui/codeeditor/js/ace/mode-turtle.js +119 -151
  325. package/src/sap/ui/codeeditor/js/ace/mode-twig.js +1099 -1350
  326. package/src/sap/ui/codeeditor/js/ace/mode-typescript.js +455 -376
  327. package/src/sap/ui/codeeditor/js/ace/mode-vala.js +382 -505
  328. package/src/sap/ui/codeeditor/js/ace/mode-vbscript.js +231 -264
  329. package/src/sap/ui/codeeditor/js/ace/mode-velocity.js +1116 -1388
  330. package/src/sap/ui/codeeditor/js/ace/mode-verilog.js +61 -81
  331. package/src/sap/ui/codeeditor/js/ace/mode-vhdl.js +57 -79
  332. package/src/sap/ui/codeeditor/js/ace/mode-visualforce.js +1046 -1292
  333. package/src/sap/ui/codeeditor/js/ace/mode-wollok.js +525 -417
  334. package/src/sap/ui/codeeditor/js/ace/mode-xml.js +182 -389
  335. package/src/sap/ui/codeeditor/js/ace/mode-xquery.js +58 -112
  336. package/src/sap/ui/codeeditor/js/ace/mode-yaml.js +202 -137
  337. package/src/sap/ui/codeeditor/js/ace/mode-zeek.js +237 -274
  338. package/src/sap/ui/codeeditor/js/ace/snippets/abc.js +5 -34
  339. package/src/sap/ui/codeeditor/js/ace/snippets/actionscript.js +5 -160
  340. package/src/sap/ui/codeeditor/js/ace/snippets/astro.js +9 -0
  341. package/src/sap/ui/codeeditor/js/ace/snippets/bibtex.js +9 -0
  342. package/src/sap/ui/codeeditor/js/ace/snippets/c_cpp.js +5 -134
  343. package/src/sap/ui/codeeditor/js/ace/snippets/clojure.js +5 -93
  344. package/src/sap/ui/codeeditor/js/ace/snippets/coffee.js +5 -98
  345. package/src/sap/ui/codeeditor/js/ace/snippets/csound_document.js +5 -13
  346. package/src/sap/ui/codeeditor/js/ace/snippets/csound_orchestra.js +5 -50
  347. package/src/sap/ui/codeeditor/js/ace/snippets/css.js +5 -970
  348. package/src/sap/ui/codeeditor/js/ace/snippets/cuttlefish.js +9 -0
  349. package/src/sap/ui/codeeditor/js/ace/snippets/dart.js +5 -86
  350. package/src/sap/ui/codeeditor/js/ace/snippets/diff.js +5 -14
  351. package/src/sap/ui/codeeditor/js/ace/snippets/django.js +5 -111
  352. package/src/sap/ui/codeeditor/js/ace/snippets/drools.js +5 -22
  353. package/src/sap/ui/codeeditor/js/ace/snippets/edifact.js +8 -246
  354. package/src/sap/ui/codeeditor/js/ace/snippets/erlang.js +5 -163
  355. package/src/sap/ui/codeeditor/js/ace/snippets/flix.js +9 -0
  356. package/src/sap/ui/codeeditor/js/ace/snippets/fsl.js +6 -4
  357. package/src/sap/ui/codeeditor/js/ace/snippets/gobstones.js +5 -1707
  358. package/src/sap/ui/codeeditor/js/ace/snippets/graphqlschema.js +5 -35
  359. package/src/sap/ui/codeeditor/js/ace/snippets/haml.js +5 -23
  360. package/src/sap/ui/codeeditor/js/ace/snippets/haskell.js +5 -85
  361. package/src/sap/ui/codeeditor/js/ace/snippets/html.js +5 -856
  362. package/src/sap/ui/codeeditor/js/ace/snippets/io.js +1 -3
  363. package/src/sap/ui/codeeditor/js/ace/snippets/ion.js +9 -0
  364. package/src/sap/ui/codeeditor/js/ace/snippets/java.js +5 -243
  365. package/src/sap/ui/codeeditor/js/ace/snippets/javascript.js +5 -198
  366. package/src/sap/ui/codeeditor/js/ace/snippets/jexl.js +9 -0
  367. package/src/sap/ui/codeeditor/js/ace/snippets/jsoniq.js +44 -41
  368. package/src/sap/ui/codeeditor/js/ace/snippets/jsp.js +5 -102
  369. package/src/sap/ui/codeeditor/js/ace/snippets/liquid.js +5 -884
  370. package/src/sap/ui/codeeditor/js/ace/snippets/lsl.js +5 -1235
  371. package/src/sap/ui/codeeditor/js/ace/snippets/lua.js +5 -24
  372. package/src/sap/ui/codeeditor/js/ace/snippets/makefile.js +5 -7
  373. package/src/sap/ui/codeeditor/js/ace/snippets/markdown.js +5 -91
  374. package/src/sap/ui/codeeditor/js/ace/snippets/maze.js +5 -12
  375. package/src/sap/ui/codeeditor/js/ace/snippets/nasal.js +9 -0
  376. package/src/sap/ui/codeeditor/js/ace/snippets/odin.js +9 -0
  377. package/src/sap/ui/codeeditor/js/ace/snippets/partiql.js +9 -0
  378. package/src/sap/ui/codeeditor/js/ace/snippets/perl.js +5 -350
  379. package/src/sap/ui/codeeditor/js/ace/snippets/php.js +5 -386
  380. package/src/sap/ui/codeeditor/js/ace/snippets/plsql.js +9 -0
  381. package/src/sap/ui/codeeditor/js/ace/snippets/prql.js +9 -0
  382. package/src/sap/ui/codeeditor/js/ace/snippets/python.js +5 -161
  383. package/src/sap/ui/codeeditor/js/ace/snippets/r.js +5 -124
  384. package/src/sap/ui/codeeditor/js/ace/snippets/razor.js +5 -6
  385. package/src/sap/ui/codeeditor/js/ace/snippets/robot.js +16 -0
  386. package/src/sap/ui/codeeditor/js/ace/snippets/rst.js +5 -25
  387. package/src/sap/ui/codeeditor/js/ace/snippets/ruby.js +5 -931
  388. package/src/sap/ui/codeeditor/js/ace/snippets/sac.js +9 -0
  389. package/src/sap/ui/codeeditor/js/ace/snippets/sh.js +5 -86
  390. package/src/sap/ui/codeeditor/js/ace/snippets/snippets.js +5 -12
  391. package/src/sap/ui/codeeditor/js/ace/snippets/sql.js +5 -29
  392. package/src/sap/ui/codeeditor/js/ace/snippets/sqlserver.js +5 -72
  393. package/src/sap/ui/codeeditor/js/ace/snippets/tcl.js +5 -95
  394. package/src/sap/ui/codeeditor/js/ace/snippets/tex.js +5 -193
  395. package/src/sap/ui/codeeditor/js/ace/snippets/textile.js +5 -33
  396. package/src/sap/ui/codeeditor/js/ace/snippets/vala.js +1 -2
  397. package/src/sap/ui/codeeditor/js/ace/snippets/velocity.js +5 -31
  398. package/src/sap/ui/codeeditor/js/ace/snippets/wollok.js +5 -87
  399. package/src/sap/ui/codeeditor/js/ace/snippets/xquery.js +44 -41
  400. package/src/sap/ui/codeeditor/js/ace/theme-ambiance.js +5 -172
  401. package/src/sap/ui/codeeditor/js/ace/theme-chaos.js +5 -150
  402. package/src/sap/ui/codeeditor/js/ace/theme-chrome.js +6 -123
  403. package/src/sap/ui/codeeditor/js/ace/theme-cloud9_day.js +19 -0
  404. package/src/sap/ui/codeeditor/js/ace/theme-cloud9_night.js +18 -0
  405. package/src/sap/ui/codeeditor/js/ace/theme-cloud9_night_low_color.js +18 -0
  406. package/src/sap/ui/codeeditor/js/ace/theme-clouds.js +6 -90
  407. package/src/sap/ui/codeeditor/js/ace/theme-clouds_midnight.js +6 -91
  408. package/src/sap/ui/codeeditor/js/ace/theme-cobalt.js +6 -108
  409. package/src/sap/ui/codeeditor/js/ace/theme-crimson_editor.js +6 -113
  410. package/src/sap/ui/codeeditor/js/ace/theme-dawn.js +6 -103
  411. package/src/sap/ui/codeeditor/js/ace/theme-dracula.js +6 -122
  412. package/src/sap/ui/codeeditor/js/ace/theme-dreamweaver.js +7 -137
  413. package/src/sap/ui/codeeditor/js/ace/theme-eclipse.js +6 -92
  414. package/src/sap/ui/codeeditor/js/ace/theme-github.js +7 -99
  415. package/src/sap/ui/codeeditor/js/ace/theme-github_dark.js +18 -0
  416. package/src/sap/ui/codeeditor/js/ace/theme-gob.js +6 -107
  417. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox.js +5 -76
  418. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox_dark_hard.js +18 -0
  419. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox_light_hard.js +18 -0
  420. package/src/sap/ui/codeeditor/js/ace/theme-idle_fingers.js +6 -91
  421. package/src/sap/ui/codeeditor/js/ace/theme-iplastic.js +6 -116
  422. package/src/sap/ui/codeeditor/js/ace/theme-katzenmilch.js +6 -116
  423. package/src/sap/ui/codeeditor/js/ace/theme-kr_theme.js +6 -99
  424. package/src/sap/ui/codeeditor/js/ace/theme-kuroir.js +6 -56
  425. package/src/sap/ui/codeeditor/js/ace/theme-merbivore.js +6 -90
  426. package/src/sap/ui/codeeditor/js/ace/theme-merbivore_soft.js +6 -91
  427. package/src/sap/ui/codeeditor/js/ace/theme-mono_industrial.js +6 -102
  428. package/src/sap/ui/codeeditor/js/ace/theme-monokai.js +6 -100
  429. package/src/sap/ui/codeeditor/js/ace/theme-nord_dark.js +6 -89
  430. package/src/sap/ui/codeeditor/js/ace/theme-one_dark.js +10 -131
  431. package/src/sap/ui/codeeditor/js/ace/theme-pastel_on_dark.js +6 -103
  432. package/src/sap/ui/codeeditor/js/ace/theme-solarized_dark.js +6 -83
  433. package/src/sap/ui/codeeditor/js/ace/theme-solarized_light.js +6 -86
  434. package/src/sap/ui/codeeditor/js/ace/theme-sqlserver.js +6 -133
  435. package/src/sap/ui/codeeditor/js/ace/theme-terminal.js +6 -109
  436. package/src/sap/ui/codeeditor/js/ace/theme-textmate.js +3 -124
  437. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow.js +6 -103
  438. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night.js +6 -103
  439. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_blue.js +6 -101
  440. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_bright.js +6 -116
  441. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_eighties.js +6 -103
  442. package/src/sap/ui/codeeditor/js/ace/theme-twilight.js +6 -104
  443. package/src/sap/ui/codeeditor/js/ace/theme-vibrant_ink.js +6 -89
  444. package/src/sap/ui/codeeditor/js/ace/theme-xcode.js +6 -83
  445. package/src/sap/ui/codeeditor/js/ace/worker-base.js +516 -595
  446. package/src/sap/ui/codeeditor/js/ace/worker-coffee.js +496 -575
  447. package/src/sap/ui/codeeditor/js/ace/worker-css.js +501 -578
  448. package/src/sap/ui/codeeditor/js/ace/worker-html.js +515 -584
  449. package/src/sap/ui/codeeditor/js/ace/worker-javascript.js +2964 -2551
  450. package/src/sap/ui/codeeditor/js/ace/worker-json.js +496 -575
  451. package/src/sap/ui/codeeditor/js/ace/worker-lua.js +497 -576
  452. package/src/sap/ui/codeeditor/js/ace/worker-php.js +2906 -2795
  453. package/src/sap/ui/codeeditor/js/ace/worker-xml.js +496 -575
  454. package/src/sap/ui/codeeditor/js/ace/worker-xquery.js +496 -575
  455. package/src/sap/ui/codeeditor/js/ace/worker-yaml.js +5851 -0
  456. package/src/sap/ui/codeeditor/library.js +6 -5
  457. package/LICENSES/BSD-2-Clause.txt +0 -22
@@ -1,25 +1,38 @@
1
- ace.define("ace/occur",[], function(require, exports, module) {
2
- "use strict";
3
-
1
+ ace.define("ace/occur",["require","exports","module","ace/lib/oop","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"], function(require, exports, module){"use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
4
17
  var oop = require("./lib/oop");
5
- var Range = require("./range").Range;
6
18
  var Search = require("./search").Search;
7
19
  var EditSession = require("./edit_session").EditSession;
8
20
  var SearchHighlight = require("./search_highlight").SearchHighlight;
9
- function Occur() {}
10
-
11
- oop.inherits(Occur, Search);
12
-
13
- (function() {
14
- this.enter = function(editor, options) {
15
- if (!options.needle) return false;
21
+ var Occur = /** @class */ (function (_super) {
22
+ __extends(Occur, _super);
23
+ function Occur() {
24
+ return _super !== null && _super.apply(this, arguments) || this;
25
+ }
26
+ Occur.prototype.enter = function (editor, options) {
27
+ if (!options.needle)
28
+ return false;
16
29
  var pos = editor.getCursorPosition();
17
30
  this.displayOccurContent(editor, options);
18
31
  var translatedPos = this.originalToOccurPosition(editor.session, pos);
19
32
  editor.moveCursorToPosition(translatedPos);
20
33
  return true;
21
34
  };
22
- this.exit = function(editor, options) {
35
+ Occur.prototype.exit = function (editor, options) {
23
36
  var pos = options.translatePosition && editor.getCursorPosition();
24
37
  var translatedPos = pos && this.occurToOriginalPosition(editor.session, pos);
25
38
  this.displayOriginalContent(editor);
@@ -27,18 +40,15 @@ oop.inherits(Occur, Search);
27
40
  editor.moveCursorToPosition(translatedPos);
28
41
  return true;
29
42
  };
30
-
31
- this.highlight = function(sess, regexp) {
32
- var hl = sess.$occurHighlight = sess.$occurHighlight || sess.addDynamicMarker(
33
- new SearchHighlight(null, "ace_occur-highlight", "text"));
43
+ Occur.prototype.highlight = function (sess, regexp) {
44
+ var hl = sess.$occurHighlight = sess.$occurHighlight || sess.addDynamicMarker(new SearchHighlight(null, "ace_occur-highlight", "text"));
34
45
  hl.setRegexp(regexp);
35
46
  sess._emit("changeBackMarker"); // force highlight layer redraw
36
47
  };
37
-
38
- this.displayOccurContent = function(editor, options) {
48
+ Occur.prototype.displayOccurContent = function (editor, options) {
39
49
  this.$originalSession = editor.session;
40
50
  var found = this.matchingLines(editor.session, options);
41
- var lines = found.map(function(foundLine) { return foundLine.content; });
51
+ var lines = found.map(function (foundLine) { return foundLine.content; });
42
52
  var occurSession = new EditSession(lines.join('\n'));
43
53
  occurSession.$occur = this;
44
54
  occurSession.$occurMatchingLines = found;
@@ -48,44 +58,43 @@ oop.inherits(Occur, Search);
48
58
  this.highlight(occurSession, options.re);
49
59
  occurSession._emit('changeBackMarker');
50
60
  };
51
-
52
- this.displayOriginalContent = function(editor) {
61
+ Occur.prototype.displayOriginalContent = function (editor) {
53
62
  editor.setSession(this.$originalSession);
54
63
  this.$originalSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart;
55
64
  };
56
- this.originalToOccurPosition = function(session, pos) {
65
+ Occur.prototype.originalToOccurPosition = function (session, pos) {
57
66
  var lines = session.$occurMatchingLines;
58
- var nullPos = {row: 0, column: 0};
59
- if (!lines) return nullPos;
67
+ var nullPos = { row: 0, column: 0 };
68
+ if (!lines)
69
+ return nullPos;
60
70
  for (var i = 0; i < lines.length; i++) {
61
71
  if (lines[i].row === pos.row)
62
- return {row: i, column: pos.column};
72
+ return { row: i, column: pos.column };
63
73
  }
64
74
  return nullPos;
65
75
  };
66
- this.occurToOriginalPosition = function(session, pos) {
76
+ Occur.prototype.occurToOriginalPosition = function (session, pos) {
67
77
  var lines = session.$occurMatchingLines;
68
78
  if (!lines || !lines[pos.row])
69
79
  return pos;
70
- return {row: lines[pos.row].row, column: pos.column};
80
+ return { row: lines[pos.row].row, column: pos.column };
71
81
  };
72
-
73
- this.matchingLines = function(session, options) {
82
+ Occur.prototype.matchingLines = function (session, options) {
74
83
  options = oop.mixin({}, options);
75
- if (!session || !options.needle) return [];
84
+ if (!session || !options.needle)
85
+ return [];
76
86
  var search = new Search();
77
87
  search.set(options);
78
- return search.findAll(session).reduce(function(lines, range) {
88
+ return search.findAll(session).reduce(function (lines, range) {
79
89
  var row = range.start.row;
80
- var last = lines[lines.length-1];
90
+ var last = lines[lines.length - 1];
81
91
  return last && last.row === row ?
82
92
  lines :
83
- lines.concat({row: row, content: session.getLine(row)});
93
+ lines.concat({ row: row, content: session.getLine(row) });
84
94
  }, []);
85
95
  };
86
-
87
- }).call(Occur.prototype);
88
-
96
+ return Occur;
97
+ }(Search));
89
98
  var dom = require('./lib/dom');
90
99
  dom.importCssString(".ace_occur-highlight {\n\
91
100
  border-radius: 4px;\n\
@@ -99,18 +108,14 @@ dom.importCssString(".ace_occur-highlight {\n\
99
108
  background-color: rgb(80, 140, 85);\n\
100
109
  box-shadow: 0 0 4px rgb(60, 120, 70);\n\
101
110
  }\n", "incremental-occur-highlighting", false);
102
-
103
111
  exports.Occur = Occur;
104
112
 
105
113
  });
106
114
 
107
- ace.define("ace/commands/occur_commands",[], function(require, exports, module) {
108
-
109
- var config = require("../config"),
110
- Occur = require("../occur").Occur;
115
+ ace.define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"], function(require, exports, module){var config = require("../config"), Occur = require("../occur").Occur;
111
116
  var occurStartCommand = {
112
117
  name: "occur",
113
- exec: function(editor, options) {
118
+ exec: function (editor, options) {
114
119
  var alreadyInOccur = !!editor.session.$occur;
115
120
  var occurSessionActive = new Occur().enter(editor, options);
116
121
  if (occurSessionActive && !alreadyInOccur)
@@ -118,214 +123,195 @@ var occurStartCommand = {
118
123
  },
119
124
  readOnly: true
120
125
  };
121
-
122
126
  var occurCommands = [{
123
- name: "occurexit",
124
- bindKey: 'esc|Ctrl-G',
125
- exec: function(editor) {
126
- var occur = editor.session.$occur;
127
- if (!occur) return;
128
- occur.exit(editor, {});
129
- if (!editor.session.$occur) OccurKeyboardHandler.uninstallFrom(editor);
130
- },
131
- readOnly: true
132
- }, {
133
- name: "occuraccept",
134
- bindKey: 'enter',
135
- exec: function(editor) {
136
- var occur = editor.session.$occur;
137
- if (!occur) return;
138
- occur.exit(editor, {translatePosition: true});
139
- if (!editor.session.$occur) OccurKeyboardHandler.uninstallFrom(editor);
140
- },
141
- readOnly: true
142
- }];
143
-
127
+ name: "occurexit",
128
+ bindKey: 'esc|Ctrl-G',
129
+ exec: function (editor) {
130
+ var occur = editor.session.$occur;
131
+ if (!occur)
132
+ return;
133
+ occur.exit(editor, {});
134
+ if (!editor.session.$occur)
135
+ OccurKeyboardHandler.uninstallFrom(editor);
136
+ },
137
+ readOnly: true
138
+ }, {
139
+ name: "occuraccept",
140
+ bindKey: 'enter',
141
+ exec: function (editor) {
142
+ var occur = editor.session.$occur;
143
+ if (!occur)
144
+ return;
145
+ occur.exit(editor, { translatePosition: true });
146
+ if (!editor.session.$occur)
147
+ OccurKeyboardHandler.uninstallFrom(editor);
148
+ },
149
+ readOnly: true
150
+ }];
144
151
  var HashHandler = require("../keyboard/hash_handler").HashHandler;
145
152
  var oop = require("../lib/oop");
146
-
147
-
148
- function OccurKeyboardHandler() {}
149
-
153
+ function OccurKeyboardHandler() { }
150
154
  oop.inherits(OccurKeyboardHandler, HashHandler);
151
-
152
- (function() {
153
-
155
+ (function () {
154
156
  this.isOccurHandler = true;
155
-
156
- this.attach = function(editor) {
157
+ this.attach = function (editor) {
157
158
  HashHandler.call(this, occurCommands, editor.commands.platform);
158
159
  this.$editor = editor;
159
160
  };
160
-
161
161
  var handleKeyboard$super = this.handleKeyboard;
162
- this.handleKeyboard = function(data, hashId, key, keyCode) {
162
+ this.handleKeyboard = function (data, hashId, key, keyCode) {
163
163
  var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
164
164
  return (cmd && cmd.command) ? cmd : undefined;
165
165
  };
166
-
167
166
  }).call(OccurKeyboardHandler.prototype);
168
-
169
- OccurKeyboardHandler.installIn = function(editor) {
167
+ OccurKeyboardHandler.installIn = function (editor) {
170
168
  var handler = new this();
171
169
  editor.keyBinding.addKeyboardHandler(handler);
172
170
  editor.commands.addCommands(occurCommands);
173
171
  };
174
-
175
- OccurKeyboardHandler.uninstallFrom = function(editor) {
172
+ OccurKeyboardHandler.uninstallFrom = function (editor) {
176
173
  editor.commands.removeCommands(occurCommands);
177
174
  var handler = editor.getKeyboardHandler();
178
175
  if (handler.isOccurHandler)
179
176
  editor.keyBinding.removeKeyboardHandler(handler);
180
177
  };
181
-
182
178
  exports.occurStartCommand = occurStartCommand;
183
179
 
184
180
  });
185
181
 
186
- ace.define("ace/commands/incremental_search_commands",[], function(require, exports, module) {
187
-
188
- var config = require("../config");
182
+ ace.define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"], function(require, exports, module){var config = require("../config");
189
183
  var oop = require("../lib/oop");
190
184
  var HashHandler = require("../keyboard/hash_handler").HashHandler;
191
185
  var occurStartCommand = require("./occur_commands").occurStartCommand;
192
186
  exports.iSearchStartCommands = [{
193
- name: "iSearch",
194
- bindKey: {win: "Ctrl-F", mac: "Command-F"},
195
- exec: function(editor, options) {
196
- config.loadModule(["core", "ace/incremental_search"], function(e) {
197
- var iSearch = e.iSearch = e.iSearch || new e.IncrementalSearch();
198
- iSearch.activate(editor, options.backwards);
199
- if (options.jumpToFirstMatch) iSearch.next(options);
200
- });
201
- },
202
- readOnly: true
203
- }, {
204
- name: "iSearchBackwards",
205
- exec: function(editor, jumpToNext) { editor.execCommand('iSearch', {backwards: true}); },
206
- readOnly: true
207
- }, {
208
- name: "iSearchAndGo",
209
- bindKey: {win: "Ctrl-K", mac: "Command-G"},
210
- exec: function(editor, jumpToNext) { editor.execCommand('iSearch', {jumpToFirstMatch: true, useCurrentOrPrevSearch: true}); },
211
- readOnly: true
212
- }, {
213
- name: "iSearchBackwardsAndGo",
214
- bindKey: {win: "Ctrl-Shift-K", mac: "Command-Shift-G"},
215
- exec: function(editor) { editor.execCommand('iSearch', {jumpToFirstMatch: true, backwards: true, useCurrentOrPrevSearch: true}); },
216
- readOnly: true
217
- }];
187
+ name: "iSearch",
188
+ bindKey: { win: "Ctrl-F", mac: "Command-F" },
189
+ exec: function (editor, options) {
190
+ config.loadModule(["core", "ace/incremental_search"], function (e) {
191
+ var iSearch = e.iSearch = e.iSearch || new e.IncrementalSearch();
192
+ iSearch.activate(editor, options.backwards);
193
+ if (options.jumpToFirstMatch)
194
+ iSearch.next(options);
195
+ });
196
+ },
197
+ readOnly: true
198
+ }, {
199
+ name: "iSearchBackwards",
200
+ exec: function (editor, jumpToNext) { editor.execCommand('iSearch', { backwards: true }); },
201
+ readOnly: true
202
+ }, {
203
+ name: "iSearchAndGo",
204
+ bindKey: { win: "Ctrl-K", mac: "Command-G" },
205
+ exec: function (editor, jumpToNext) { editor.execCommand('iSearch', { jumpToFirstMatch: true, useCurrentOrPrevSearch: true }); },
206
+ readOnly: true
207
+ }, {
208
+ name: "iSearchBackwardsAndGo",
209
+ bindKey: { win: "Ctrl-Shift-K", mac: "Command-Shift-G" },
210
+ exec: function (editor) { editor.execCommand('iSearch', { jumpToFirstMatch: true, backwards: true, useCurrentOrPrevSearch: true }); },
211
+ readOnly: true
212
+ }];
218
213
  exports.iSearchCommands = [{
219
- name: "restartSearch",
220
- bindKey: {win: "Ctrl-F", mac: "Command-F"},
221
- exec: function(iSearch) {
222
- iSearch.cancelSearch(true);
223
- }
224
- }, {
225
- name: "searchForward",
226
- bindKey: {win: "Ctrl-S|Ctrl-K", mac: "Ctrl-S|Command-G"},
227
- exec: function(iSearch, options) {
228
- options.useCurrentOrPrevSearch = true;
229
- iSearch.next(options);
230
- }
231
- }, {
232
- name: "searchBackward",
233
- bindKey: {win: "Ctrl-R|Ctrl-Shift-K", mac: "Ctrl-R|Command-Shift-G"},
234
- exec: function(iSearch, options) {
235
- options.useCurrentOrPrevSearch = true;
236
- options.backwards = true;
237
- iSearch.next(options);
238
- }
239
- }, {
240
- name: "extendSearchTerm",
241
- exec: function(iSearch, string) {
242
- iSearch.addString(string);
243
- }
244
- }, {
245
- name: "extendSearchTermSpace",
246
- bindKey: "space",
247
- exec: function(iSearch) { iSearch.addString(' '); }
248
- }, {
249
- name: "shrinkSearchTerm",
250
- bindKey: "backspace",
251
- exec: function(iSearch) {
252
- iSearch.removeChar();
253
- }
254
- }, {
255
- name: 'confirmSearch',
256
- bindKey: 'return',
257
- exec: function(iSearch) { iSearch.deactivate(); }
258
- }, {
259
- name: 'cancelSearch',
260
- bindKey: 'esc|Ctrl-G',
261
- exec: function(iSearch) { iSearch.deactivate(true); }
262
- }, {
263
- name: 'occurisearch',
264
- bindKey: 'Ctrl-O',
265
- exec: function(iSearch) {
266
- var options = oop.mixin({}, iSearch.$options);
267
- iSearch.deactivate();
268
- occurStartCommand.exec(iSearch.$editor, options);
269
- }
270
- }, {
271
- name: "yankNextWord",
272
- bindKey: "Ctrl-w",
273
- exec: function(iSearch) {
274
- var ed = iSearch.$editor,
275
- range = ed.selection.getRangeOfMovements(function(sel) { sel.moveCursorWordRight(); }),
276
- string = ed.session.getTextRange(range);
277
- iSearch.addString(string);
278
- }
279
- }, {
280
- name: "yankNextChar",
281
- bindKey: "Ctrl-Alt-y",
282
- exec: function(iSearch) {
283
- var ed = iSearch.$editor,
284
- range = ed.selection.getRangeOfMovements(function(sel) { sel.moveCursorRight(); }),
285
- string = ed.session.getTextRange(range);
286
- iSearch.addString(string);
287
- }
288
- }, {
289
- name: 'recenterTopBottom',
290
- bindKey: 'Ctrl-l',
291
- exec: function(iSearch) { iSearch.$editor.execCommand('recenterTopBottom'); }
292
- }, {
293
- name: 'selectAllMatches',
294
- bindKey: 'Ctrl-space',
295
- exec: function(iSearch) {
296
- var ed = iSearch.$editor,
297
- hl = ed.session.$isearchHighlight,
298
- ranges = hl && hl.cache ? hl.cache
299
- .reduce(function(ranges, ea) {
300
- return ranges.concat(ea ? ea : []); }, []) : [];
301
- iSearch.deactivate(false);
302
- ranges.forEach(ed.selection.addRange.bind(ed.selection));
303
- }
304
- }, {
305
- name: 'searchAsRegExp',
306
- bindKey: 'Alt-r',
307
- exec: function(iSearch) {
308
- iSearch.convertNeedleToRegExp();
309
- }
310
- }].map(function(cmd) {
214
+ name: "restartSearch",
215
+ bindKey: { win: "Ctrl-F", mac: "Command-F" },
216
+ exec: function (iSearch) {
217
+ iSearch.cancelSearch(true);
218
+ }
219
+ }, {
220
+ name: "searchForward",
221
+ bindKey: { win: "Ctrl-S|Ctrl-K", mac: "Ctrl-S|Command-G" },
222
+ exec: function (iSearch, options) {
223
+ options.useCurrentOrPrevSearch = true;
224
+ iSearch.next(options);
225
+ }
226
+ }, {
227
+ name: "searchBackward",
228
+ bindKey: { win: "Ctrl-R|Ctrl-Shift-K", mac: "Ctrl-R|Command-Shift-G" },
229
+ exec: function (iSearch, options) {
230
+ options.useCurrentOrPrevSearch = true;
231
+ options.backwards = true;
232
+ iSearch.next(options);
233
+ }
234
+ }, {
235
+ name: "extendSearchTerm",
236
+ exec: function (iSearch, string) {
237
+ iSearch.addString(string);
238
+ }
239
+ }, {
240
+ name: "extendSearchTermSpace",
241
+ bindKey: "space",
242
+ exec: function (iSearch) { iSearch.addString(' '); }
243
+ }, {
244
+ name: "shrinkSearchTerm",
245
+ bindKey: "backspace",
246
+ exec: function (iSearch) {
247
+ iSearch.removeChar();
248
+ }
249
+ }, {
250
+ name: 'confirmSearch',
251
+ bindKey: 'return',
252
+ exec: function (iSearch) { iSearch.deactivate(); }
253
+ }, {
254
+ name: 'cancelSearch',
255
+ bindKey: 'esc|Ctrl-G',
256
+ exec: function (iSearch) { iSearch.deactivate(true); }
257
+ }, {
258
+ name: 'occurisearch',
259
+ bindKey: 'Ctrl-O',
260
+ exec: function (iSearch) {
261
+ var options = oop.mixin({}, iSearch.$options);
262
+ iSearch.deactivate();
263
+ occurStartCommand.exec(iSearch.$editor, options);
264
+ }
265
+ }, {
266
+ name: "yankNextWord",
267
+ bindKey: "Ctrl-w",
268
+ exec: function (iSearch) {
269
+ var ed = iSearch.$editor, range = ed.selection.getRangeOfMovements(function (sel) { sel.moveCursorWordRight(); }), string = ed.session.getTextRange(range);
270
+ iSearch.addString(string);
271
+ }
272
+ }, {
273
+ name: "yankNextChar",
274
+ bindKey: "Ctrl-Alt-y",
275
+ exec: function (iSearch) {
276
+ var ed = iSearch.$editor, range = ed.selection.getRangeOfMovements(function (sel) { sel.moveCursorRight(); }), string = ed.session.getTextRange(range);
277
+ iSearch.addString(string);
278
+ }
279
+ }, {
280
+ name: 'recenterTopBottom',
281
+ bindKey: 'Ctrl-l',
282
+ exec: function (iSearch) { iSearch.$editor.execCommand('recenterTopBottom'); }
283
+ }, {
284
+ name: 'selectAllMatches',
285
+ bindKey: 'Ctrl-space',
286
+ exec: function (iSearch) {
287
+ var ed = iSearch.$editor, hl = ed.session.$isearchHighlight, ranges = hl && hl.cache ? hl.cache
288
+ .reduce(function (ranges, ea) {
289
+ return ranges.concat(ea ? ea : []);
290
+ }, []) : [];
291
+ iSearch.deactivate(false);
292
+ ranges.forEach(ed.selection.addRange.bind(ed.selection));
293
+ }
294
+ }, {
295
+ name: 'searchAsRegExp',
296
+ bindKey: 'Alt-r',
297
+ exec: function (iSearch) {
298
+ iSearch.convertNeedleToRegExp();
299
+ }
300
+ }].map(function (cmd) {
311
301
  cmd.readOnly = true;
312
302
  cmd.isIncrementalSearchCommand = true;
313
303
  cmd.scrollIntoView = "animate-cursor";
314
304
  return cmd;
315
305
  });
316
-
317
306
  function IncrementalSearchKeyboardHandler(iSearch) {
318
307
  this.$iSearch = iSearch;
319
308
  }
320
-
321
309
  oop.inherits(IncrementalSearchKeyboardHandler, HashHandler);
322
-
323
- (function() {
324
-
325
- this.attach = function(editor) {
310
+ (function () {
311
+ this.attach = function (editor) {
326
312
  var iSearch = this.$iSearch;
327
313
  HashHandler.call(this, exports.iSearchCommands, editor.commands.platform);
328
- this.$commandExecHandler = editor.commands.on('exec', function(e) {
314
+ this.$commandExecHandler = editor.commands.on('exec', function (e) {
329
315
  if (!e.command.isIncrementalSearchCommand)
330
316
  return iSearch.deactivate();
331
317
  e.stopPropagation();
@@ -337,89 +323,97 @@ oop.inherits(IncrementalSearchKeyboardHandler, HashHandler);
337
323
  return result;
338
324
  });
339
325
  };
340
-
341
- this.detach = function(editor) {
342
- if (!this.$commandExecHandler) return;
326
+ this.detach = function (editor) {
327
+ if (!this.$commandExecHandler)
328
+ return;
343
329
  editor.commands.off('exec', this.$commandExecHandler);
344
330
  delete this.$commandExecHandler;
345
331
  };
346
-
347
332
  var handleKeyboard$super = this.handleKeyboard;
348
- this.handleKeyboard = function(data, hashId, key, keyCode) {
349
- if (((hashId === 1/*ctrl*/ || hashId === 8/*command*/) && key === 'v')
350
- || (hashId === 1/*ctrl*/ && key === 'y')) return null;
333
+ this.handleKeyboard = function (data, hashId, key, keyCode) {
334
+ if (((hashId === 1 /*ctrl*/ || hashId === 8 /*command*/) && key === 'v')
335
+ || (hashId === 1 /*ctrl*/ && key === 'y'))
336
+ return null;
351
337
  var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
352
- if (cmd && cmd.command) { return cmd; }
338
+ if (cmd && cmd.command) {
339
+ return cmd;
340
+ }
353
341
  if (hashId == -1) {
354
342
  var extendCmd = this.commands.extendSearchTerm;
355
- if (extendCmd) { return {command: extendCmd, args: key}; }
343
+ if (extendCmd) {
344
+ return { command: extendCmd, args: key };
345
+ }
356
346
  }
357
347
  return false;
358
348
  };
359
-
360
349
  }).call(IncrementalSearchKeyboardHandler.prototype);
361
-
362
-
363
350
  exports.IncrementalSearchKeyboardHandler = IncrementalSearchKeyboardHandler;
364
351
 
365
352
  });
366
353
 
367
- ace.define("ace/incremental_search",[], function(require, exports, module) {
368
- "use strict";
369
-
370
- var oop = require("./lib/oop");
354
+ ace.define("ace/incremental_search",["require","exports","module","ace/range","ace/search","ace/search_highlight","ace/commands/incremental_search_commands","ace/lib/dom","ace/commands/command_manager","ace/editor","ace/config"], function(require, exports, module){"use strict";
355
+ var __extends = (this && this.__extends) || (function () {
356
+ var extendStatics = function (d, b) {
357
+ extendStatics = Object.setPrototypeOf ||
358
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
359
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
360
+ return extendStatics(d, b);
361
+ };
362
+ return function (d, b) {
363
+ if (typeof b !== "function" && b !== null)
364
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
365
+ extendStatics(d, b);
366
+ function __() { this.constructor = d; }
367
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
368
+ };
369
+ })();
371
370
  var Range = require("./range").Range;
372
371
  var Search = require("./search").Search;
373
372
  var SearchHighlight = require("./search_highlight").SearchHighlight;
374
373
  var iSearchCommandModule = require("./commands/incremental_search_commands");
375
374
  var ISearchKbd = iSearchCommandModule.IncrementalSearchKeyboardHandler;
376
- function IncrementalSearch() {
377
- this.$options = {wrap: false, skipCurrent: false};
378
- this.$keyboardHandler = new ISearchKbd(this);
379
- }
380
-
381
- oop.inherits(IncrementalSearch, Search);
382
-
383
375
  function isRegExp(obj) {
384
376
  return obj instanceof RegExp;
385
377
  }
386
-
387
378
  function regExpToObject(re) {
388
- var string = String(re),
389
- start = string.indexOf('/'),
390
- flagStart = string.lastIndexOf('/');
379
+ var string = String(re), start = string.indexOf('/'), flagStart = string.lastIndexOf('/');
391
380
  return {
392
- expression: string.slice(start+1, flagStart),
393
- flags: string.slice(flagStart+1)
381
+ expression: string.slice(start + 1, flagStart),
382
+ flags: string.slice(flagStart + 1)
394
383
  };
395
384
  }
396
-
397
385
  function stringToRegExp(string, flags) {
398
386
  try {
399
387
  return new RegExp(string, flags);
400
- } catch (e) { return string; }
388
+ }
389
+ catch (e) {
390
+ return string;
391
+ }
401
392
  }
402
-
403
393
  function objectToRegExp(obj) {
404
394
  return stringToRegExp(obj.expression, obj.flags);
405
395
  }
406
-
407
- (function() {
408
-
409
- this.activate = function(editor, backwards) {
396
+ var IncrementalSearch = /** @class */ (function (_super) {
397
+ __extends(IncrementalSearch, _super);
398
+ function IncrementalSearch() {
399
+ var _this = _super.call(this) || this;
400
+ _this.$options = { wrap: false, skipCurrent: false };
401
+ _this.$keyboardHandler = new ISearchKbd(_this);
402
+ return _this;
403
+ }
404
+ IncrementalSearch.prototype.activate = function (editor, backwards) {
410
405
  this.$editor = editor;
411
406
  this.$startPos = this.$currentPos = editor.getCursorPosition();
412
407
  this.$options.needle = '';
413
408
  this.$options.backwards = backwards;
414
409
  editor.keyBinding.addKeyboardHandler(this.$keyboardHandler);
415
- this.$originalEditorOnPaste = editor.onPaste;
410
+ this.$originalEditorOnPaste = editor.onPaste;
416
411
  editor.onPaste = this.onPaste.bind(this);
417
412
  this.$mousedownHandler = editor.on('mousedown', this.onMouseDown.bind(this));
418
413
  this.selectionFix(editor);
419
414
  this.statusMessage(true);
420
415
  };
421
-
422
- this.deactivate = function(reset) {
416
+ IncrementalSearch.prototype.deactivate = function (reset) {
423
417
  this.cancelSearch(reset);
424
418
  var editor = this.$editor;
425
419
  editor.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
@@ -430,37 +424,33 @@ function objectToRegExp(obj) {
430
424
  editor.onPaste = this.$originalEditorOnPaste;
431
425
  this.message('');
432
426
  };
433
-
434
- this.selectionFix = function(editor) {
427
+ IncrementalSearch.prototype.selectionFix = function (editor) {
435
428
  if (editor.selection.isEmpty() && !editor.session.$emacsMark) {
436
429
  editor.clearSelection();
437
430
  }
438
431
  };
439
-
440
- this.highlight = function(regexp) {
441
- var sess = this.$editor.session,
442
- hl = sess.$isearchHighlight = sess.$isearchHighlight || sess.addDynamicMarker(
443
- new SearchHighlight(null, "ace_isearch-result", "text"));
432
+ IncrementalSearch.prototype.highlight = function (regexp) {
433
+ var sess = this.$editor.session, hl = sess.$isearchHighlight = sess.$isearchHighlight || sess.addDynamicMarker(new SearchHighlight(null, "ace_isearch-result", "text"));
444
434
  hl.setRegexp(regexp);
445
435
  sess._emit("changeBackMarker"); // force highlight layer redraw
446
436
  };
447
-
448
- this.cancelSearch = function(reset) {
437
+ IncrementalSearch.prototype.cancelSearch = function (reset) {
449
438
  var e = this.$editor;
450
439
  this.$prevNeedle = this.$options.needle;
451
440
  this.$options.needle = '';
452
441
  if (reset) {
453
442
  e.moveCursorToPosition(this.$startPos);
454
443
  this.$currentPos = this.$startPos;
455
- } else {
444
+ }
445
+ else {
456
446
  e.pushEmacsMark && e.pushEmacsMark(this.$startPos, false);
457
447
  }
458
448
  this.highlight(null);
459
449
  return Range.fromPoints(this.$currentPos, this.$currentPos);
460
450
  };
461
-
462
- this.highlightAndFindWithNeedle = function(moveToNext, needleUpdateFunc) {
463
- if (!this.$editor) return null;
451
+ IncrementalSearch.prototype.highlightAndFindWithNeedle = function (moveToNext, needleUpdateFunc) {
452
+ if (!this.$editor)
453
+ return null;
464
454
  var options = this.$options;
465
455
  if (needleUpdateFunc) {
466
456
  options.needle = needleUpdateFunc.call(this, options.needle || '') || '';
@@ -470,113 +460,86 @@ function objectToRegExp(obj) {
470
460
  return this.cancelSearch(true);
471
461
  }
472
462
  options.start = this.$currentPos;
473
- var session = this.$editor.session,
474
- found = this.find(session),
475
- shouldSelect = this.$editor.emacsMark ?
476
- !!this.$editor.emacsMark() : !this.$editor.selection.isEmpty();
463
+ var session = this.$editor.session, found = this.find(session), shouldSelect = this.$editor.emacsMark ?
464
+ !!this.$editor.emacsMark() : !this.$editor.selection.isEmpty();
477
465
  if (found) {
478
- if (options.backwards) found = Range.fromPoints(found.end, found.start);
466
+ if (options.backwards)
467
+ found = Range.fromPoints(found.end, found.start);
479
468
  this.$editor.selection.setRange(Range.fromPoints(shouldSelect ? this.$startPos : found.end, found.end));
480
- if (moveToNext) this.$currentPos = found.end;
469
+ if (moveToNext)
470
+ this.$currentPos = found.end;
481
471
  this.highlight(options.re);
482
472
  }
483
-
484
473
  this.statusMessage(found);
485
-
486
474
  return found;
487
475
  };
488
-
489
- this.addString = function(s) {
490
- return this.highlightAndFindWithNeedle(false, function(needle) {
476
+ IncrementalSearch.prototype.addString = function (s) {
477
+ return this.highlightAndFindWithNeedle(false, function (needle) {
491
478
  if (!isRegExp(needle))
492
- return needle + s;
479
+ return needle + s;
493
480
  var reObj = regExpToObject(needle);
494
481
  reObj.expression += s;
495
482
  return objectToRegExp(reObj);
496
483
  });
497
484
  };
498
-
499
- this.removeChar = function(c) {
500
- return this.highlightAndFindWithNeedle(false, function(needle) {
485
+ IncrementalSearch.prototype.removeChar = function (c) {
486
+ return this.highlightAndFindWithNeedle(false, function (needle) {
501
487
  if (!isRegExp(needle))
502
- return needle.substring(0, needle.length-1);
488
+ return needle.substring(0, needle.length - 1);
503
489
  var reObj = regExpToObject(needle);
504
- reObj.expression = reObj.expression.substring(0, reObj.expression.length-1);
490
+ reObj.expression = reObj.expression.substring(0, reObj.expression.length - 1);
505
491
  return objectToRegExp(reObj);
506
492
  });
507
493
  };
508
-
509
- this.next = function(options) {
494
+ IncrementalSearch.prototype.next = function (options) {
510
495
  options = options || {};
511
496
  this.$options.backwards = !!options.backwards;
512
497
  this.$currentPos = this.$editor.getCursorPosition();
513
- return this.highlightAndFindWithNeedle(true, function(needle) {
498
+ return this.highlightAndFindWithNeedle(true, function (needle) {
514
499
  return options.useCurrentOrPrevSearch && needle.length === 0 ?
515
500
  this.$prevNeedle || '' : needle;
516
501
  });
517
502
  };
518
-
519
- this.onMouseDown = function(evt) {
503
+ IncrementalSearch.prototype.onMouseDown = function (evt) {
520
504
  this.deactivate();
521
505
  return true;
522
506
  };
523
-
524
- this.onPaste = function(text) {
507
+ IncrementalSearch.prototype.onPaste = function (text) {
525
508
  this.addString(text);
526
509
  };
527
-
528
- this.convertNeedleToRegExp = function() {
529
- return this.highlightAndFindWithNeedle(false, function(needle) {
510
+ IncrementalSearch.prototype.convertNeedleToRegExp = function () {
511
+ return this.highlightAndFindWithNeedle(false, function (needle) {
530
512
  return isRegExp(needle) ? needle : stringToRegExp(needle, 'ig');
531
513
  });
532
514
  };
533
-
534
- this.convertNeedleToString = function() {
535
- return this.highlightAndFindWithNeedle(false, function(needle) {
515
+ IncrementalSearch.prototype.convertNeedleToString = function () {
516
+ return this.highlightAndFindWithNeedle(false, function (needle) {
536
517
  return isRegExp(needle) ? regExpToObject(needle).expression : needle;
537
518
  });
538
519
  };
539
-
540
- this.statusMessage = function(found) {
520
+ IncrementalSearch.prototype.statusMessage = function (found) {
541
521
  var options = this.$options, msg = '';
542
522
  msg += options.backwards ? 'reverse-' : '';
543
523
  msg += 'isearch: ' + options.needle;
544
524
  msg += found ? '' : ' (not found)';
545
525
  this.message(msg);
546
526
  };
547
-
548
- this.message = function(msg) {
527
+ IncrementalSearch.prototype.message = function (msg) {
549
528
  if (this.$editor.showCommandLine) {
550
529
  this.$editor.showCommandLine(msg);
551
530
  this.$editor.focus();
552
531
  }
553
532
  };
554
-
555
- }).call(IncrementalSearch.prototype);
556
-
557
-
533
+ return IncrementalSearch;
534
+ }(Search));
558
535
  exports.IncrementalSearch = IncrementalSearch;
559
-
560
536
  var dom = require('./lib/dom');
561
- dom.importCssString("\
562
- .ace_marker-layer .ace_isearch-result {\
563
- position: absolute;\
564
- z-index: 6;\
565
- box-sizing: border-box;\
566
- }\
567
- div.ace_isearch-result {\
568
- border-radius: 4px;\
569
- background-color: rgba(255, 200, 0, 0.5);\
570
- box-shadow: 0 0 4px rgb(255, 200, 0);\
571
- }\
572
- .ace_dark div.ace_isearch-result {\
573
- background-color: rgb(100, 110, 160);\
574
- box-shadow: 0 0 4px rgb(80, 90, 140);\
575
- }", "incremental-search-highlighting", false);
537
+ dom.importCssString("\n.ace_marker-layer .ace_isearch-result {\n position: absolute;\n z-index: 6;\n box-sizing: border-box;\n}\ndiv.ace_isearch-result {\n border-radius: 4px;\n background-color: rgba(255, 200, 0, 0.5);\n box-shadow: 0 0 4px rgb(255, 200, 0);\n}\n.ace_dark div.ace_isearch-result {\n background-color: rgb(100, 110, 160);\n box-shadow: 0 0 4px rgb(80, 90, 140);\n}", "incremental-search-highlighting", false);
576
538
  var commands = require("./commands/command_manager");
577
- (function() {
578
- this.setupIncrementalSearch = function(editor, val) {
579
- if (this.usesIncrementalSearch == val) return;
539
+ (function () {
540
+ this.setupIncrementalSearch = function (editor, val) {
541
+ if (this.usesIncrementalSearch == val)
542
+ return;
580
543
  this.usesIncrementalSearch = val;
581
544
  var iSearchCommands = iSearchCommandModule.iSearchStartCommands;
582
545
  var method = val ? 'addCommands' : 'removeCommands';
@@ -586,114 +549,72 @@ var commands = require("./commands/command_manager");
586
549
  var Editor = require("./editor").Editor;
587
550
  require("./config").defineOptions(Editor.prototype, "editor", {
588
551
  useIncrementalSearch: {
589
- set: function(val) {
590
- this.keyBinding.$handlers.forEach(function(handler) {
552
+ set: function (val) {
553
+ this.keyBinding.$handlers.forEach(function (handler) {
591
554
  if (handler.setupIncrementalSearch) {
592
555
  handler.setupIncrementalSearch(this, val);
593
556
  }
594
557
  });
595
- this._emit('incrementalSearchSettingChanged', {isEnabled: val});
558
+ this._emit('incrementalSearchSettingChanged', { isEnabled: val });
596
559
  }
597
560
  }
598
561
  });
599
562
 
600
563
  });
601
564
 
602
- ace.define("ace/keyboard/emacs",[], function(require, exports, module) {
603
- "use strict";
604
-
565
+ ace.define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module){"use strict";
605
566
  var dom = require("../lib/dom");
606
567
  require("../incremental_search");
607
568
  var iSearchCommandModule = require("../commands/incremental_search_commands");
608
-
609
-
610
569
  var HashHandler = require("./hash_handler").HashHandler;
611
570
  exports.handler = new HashHandler();
612
-
613
571
  exports.handler.isEmacs = true;
614
572
  exports.handler.$id = "ace/keyboard/emacs";
615
-
616
- var initialized = false;
573
+ dom.importCssString("\n.emacs-mode .ace_cursor{\n border: 1px rgba(50,250,50,0.8) solid!important;\n box-sizing: border-box!important;\n background-color: rgba(0,250,0,0.9);\n opacity: 0.5;\n}\n.emacs-mode .ace_hidden-cursors .ace_cursor{\n opacity: 1;\n background-color: transparent;\n}\n.emacs-mode .ace_overwrite-cursors .ace_cursor {\n opacity: 1;\n background-color: transparent;\n border-width: 0 0 2px 2px !important;\n}\n.emacs-mode .ace_text-layer {\n z-index: 4\n}\n.emacs-mode .ace_cursor-layer {\n z-index: 2\n}", 'emacsMode');
617
574
  var $formerLongWords;
618
575
  var $formerLineStart;
619
-
620
- exports.handler.attach = function(editor) {
621
- if (!initialized) {
622
- initialized = true;
623
- dom.importCssString('\
624
- .emacs-mode .ace_cursor{\
625
- border: 1px rgba(50,250,50,0.8) solid!important;\
626
- box-sizing: border-box!important;\
627
- background-color: rgba(0,250,0,0.9);\
628
- opacity: 0.5;\
629
- }\
630
- .emacs-mode .ace_hidden-cursors .ace_cursor{\
631
- opacity: 1;\
632
- background-color: transparent;\
633
- }\
634
- .emacs-mode .ace_overwrite-cursors .ace_cursor {\
635
- opacity: 1;\
636
- background-color: transparent;\
637
- border-width: 0 0 2px 2px !important;\
638
- }\
639
- .emacs-mode .ace_text-layer {\
640
- z-index: 4\
641
- }\
642
- .emacs-mode .ace_cursor-layer {\
643
- z-index: 2\
644
- }', 'emacsMode'
645
- );
646
- }
576
+ exports.handler.attach = function (editor) {
647
577
  $formerLongWords = editor.session.$selectLongWords;
648
578
  editor.session.$selectLongWords = true;
649
579
  $formerLineStart = editor.session.$useEmacsStyleLineStart;
650
580
  editor.session.$useEmacsStyleLineStart = true;
651
-
652
581
  editor.session.$emacsMark = null; // the active mark
653
582
  editor.session.$emacsMarkRing = editor.session.$emacsMarkRing || [];
654
-
655
- editor.emacsMark = function() {
583
+ editor.emacsMark = function () {
656
584
  return this.session.$emacsMark;
657
585
  };
658
-
659
- editor.setEmacsMark = function(p) {
586
+ editor.setEmacsMark = function (p) {
660
587
  this.session.$emacsMark = p;
661
588
  };
662
-
663
- editor.pushEmacsMark = function(p, activate) {
589
+ editor.pushEmacsMark = function (p, activate) {
664
590
  var prevMark = this.session.$emacsMark;
665
591
  if (prevMark)
666
592
  this.session.$emacsMarkRing.push(prevMark);
667
- if (!p || activate) this.setEmacsMark(p);
668
- else this.session.$emacsMarkRing.push(p);
593
+ if (!p || activate)
594
+ this.setEmacsMark(p);
595
+ else
596
+ this.session.$emacsMarkRing.push(p);
669
597
  };
670
-
671
- editor.popEmacsMark = function() {
598
+ editor.popEmacsMark = function () {
672
599
  var mark = this.emacsMark();
673
- if (mark) { this.setEmacsMark(null); return mark; }
600
+ if (mark) {
601
+ this.setEmacsMark(null);
602
+ return mark;
603
+ }
674
604
  return this.session.$emacsMarkRing.pop();
675
605
  };
676
-
677
- editor.getLastEmacsMark = function(p) {
606
+ editor.getLastEmacsMark = function (p) {
678
607
  return this.session.$emacsMark || this.session.$emacsMarkRing.slice(-1)[0];
679
608
  };
680
-
681
- editor.emacsMarkForSelection = function(replacement) {
682
- var sel = this.selection,
683
- multiRangeLength = this.multiSelect ?
684
- this.multiSelect.getAllRanges().length : 1,
685
- selIndex = sel.index || 0,
686
- markRing = this.session.$emacsMarkRing,
687
- markIndex = markRing.length - (multiRangeLength - selIndex),
688
- lastMark = markRing[markIndex] || sel.anchor;
609
+ editor.emacsMarkForSelection = function (replacement) {
610
+ var sel = this.selection, multiRangeLength = this.multiSelect ?
611
+ this.multiSelect.getAllRanges().length : 1, selIndex = sel.index || 0, markRing = this.session.$emacsMarkRing, markIndex = markRing.length - (multiRangeLength - selIndex), lastMark = markRing[markIndex] || sel.anchor;
689
612
  if (replacement) {
690
- markRing.splice(markIndex, 1,
691
- "row" in replacement && "column" in replacement ?
692
- replacement : undefined);
613
+ markRing.splice(markIndex, 1, "row" in replacement && "column" in replacement ?
614
+ replacement : undefined);
693
615
  }
694
616
  return lastMark;
695
617
  };
696
-
697
618
  editor.on("click", $resetMarkMode);
698
619
  editor.on("changeSession", $kbSessionChange);
699
620
  editor.renderer.$blockCursor = true;
@@ -704,8 +625,7 @@ exports.handler.attach = function(editor) {
704
625
  editor.on('copy', this.onCopy);
705
626
  editor.on('paste', this.onPaste);
706
627
  };
707
-
708
- exports.handler.detach = function(editor) {
628
+ exports.handler.detach = function (editor) {
709
629
  editor.renderer.$blockCursor = false;
710
630
  editor.session.$selectLongWords = $formerLongWords;
711
631
  editor.session.$useEmacsStyleLineStart = $formerLineStart;
@@ -717,85 +637,76 @@ exports.handler.detach = function(editor) {
717
637
  editor.off('paste', this.onPaste);
718
638
  editor.$emacsModeHandler = null;
719
639
  };
720
-
721
- var $kbSessionChange = function(e) {
640
+ var $kbSessionChange = function (e) {
722
641
  if (e.oldSession) {
723
642
  e.oldSession.$selectLongWords = $formerLongWords;
724
643
  e.oldSession.$useEmacsStyleLineStart = $formerLineStart;
725
644
  }
726
-
727
645
  $formerLongWords = e.session.$selectLongWords;
728
646
  e.session.$selectLongWords = true;
729
647
  $formerLineStart = e.session.$useEmacsStyleLineStart;
730
648
  e.session.$useEmacsStyleLineStart = true;
731
-
732
649
  if (!e.session.hasOwnProperty('$emacsMark'))
733
650
  e.session.$emacsMark = null;
734
651
  if (!e.session.hasOwnProperty('$emacsMarkRing'))
735
652
  e.session.$emacsMarkRing = [];
736
653
  };
737
-
738
- var $resetMarkMode = function(e) {
654
+ var $resetMarkMode = function (e) {
739
655
  e.editor.session.$emacsMark = null;
740
656
  };
741
-
742
657
  var keys = require("../lib/keys").KEY_MODS;
743
- var eMods = {C: "ctrl", S: "shift", M: "alt", CMD: "command"};
658
+ var eMods = { C: "ctrl", S: "shift", M: "alt", CMD: "command" };
744
659
  var combinations = ["C-S-M-CMD",
745
- "S-M-CMD", "C-M-CMD", "C-S-CMD", "C-S-M",
746
- "M-CMD", "S-CMD", "S-M", "C-CMD", "C-M", "C-S",
747
- "CMD", "M", "S", "C"];
748
- combinations.forEach(function(c) {
660
+ "S-M-CMD", "C-M-CMD", "C-S-CMD", "C-S-M",
661
+ "M-CMD", "S-CMD", "S-M", "C-CMD", "C-M", "C-S",
662
+ "CMD", "M", "S", "C"];
663
+ combinations.forEach(function (c) {
749
664
  var hashId = 0;
750
- c.split("-").forEach(function(c) {
665
+ c.split("-").forEach(function (c) {
751
666
  hashId = hashId | keys[eMods[c]];
752
667
  });
753
668
  eMods[hashId] = c.toLowerCase() + "-";
754
669
  });
755
-
756
- exports.handler.onCopy = function(e, editor) {
757
- if (editor.$handlesEmacsOnCopy) return;
670
+ exports.handler.onCopy = function (e, editor) {
671
+ if (editor.$handlesEmacsOnCopy)
672
+ return;
758
673
  editor.$handlesEmacsOnCopy = true;
759
674
  exports.handler.commands.killRingSave.exec(editor);
760
675
  editor.$handlesEmacsOnCopy = false;
761
676
  };
762
-
763
- exports.handler.onPaste = function(e, editor) {
677
+ exports.handler.onPaste = function (e, editor) {
764
678
  editor.pushEmacsMark(editor.getCursorPosition());
765
679
  };
766
-
767
- exports.handler.bindKey = function(key, command) {
680
+ exports.handler.bindKey = function (key, command) {
768
681
  if (typeof key == "object")
769
682
  key = key[this.platform];
770
683
  if (!key)
771
684
  return;
772
-
773
685
  var ckb = this.commandKeyBinding;
774
- key.split("|").forEach(function(keyPart) {
686
+ key.split("|").forEach(function (keyPart) {
775
687
  keyPart = keyPart.toLowerCase();
776
688
  ckb[keyPart] = command;
777
- var keyParts = keyPart.split(" ").slice(0,-1);
778
- keyParts.reduce(function(keyMapKeys, keyPart, i) {
779
- var prefix = keyMapKeys[i-1] ? keyMapKeys[i-1] + ' ' : '';
689
+ var keyParts = keyPart.split(" ").slice(0, -1);
690
+ keyParts.reduce(function (keyMapKeys, keyPart, i) {
691
+ var prefix = keyMapKeys[i - 1] ? keyMapKeys[i - 1] + ' ' : '';
780
692
  return keyMapKeys.concat([prefix + keyPart]);
781
- }, []).forEach(function(keyPart) {
782
- if (!ckb[keyPart]) ckb[keyPart] = "null";
693
+ }, []).forEach(function (keyPart) {
694
+ if (!ckb[keyPart])
695
+ ckb[keyPart] = "null";
783
696
  });
784
697
  }, this);
785
698
  };
786
-
787
- exports.handler.getStatusText = function(editor, data) {
788
- var str = "";
789
- if (data.count)
790
- str += data.count;
791
- if (data.keyChain)
792
- str += " " + data.keyChain;
793
- return str;
699
+ exports.handler.getStatusText = function (editor, data) {
700
+ var str = "";
701
+ if (data.count)
702
+ str += data.count;
703
+ if (data.keyChain)
704
+ str += " " + data.keyChain;
705
+ return str;
794
706
  };
795
-
796
- exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
797
- if (keyCode === -1) return undefined;
798
-
707
+ exports.handler.handleKeyboard = function (data, hashId, key, keyCode) {
708
+ if (keyCode === -1)
709
+ return undefined;
799
710
  var editor = data.editor;
800
711
  editor._signal("changeStatus");
801
712
  if (hashId == -1) {
@@ -803,40 +714,42 @@ exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
803
714
  if (data.count) {
804
715
  var str = new Array(data.count + 1).join(key);
805
716
  data.count = null;
806
- return {command: "insertstring", args: str};
717
+ return { command: "insertstring", args: str };
807
718
  }
808
719
  }
809
-
810
720
  var modifier = eMods[hashId];
811
721
  if (modifier == "c-" || data.count) {
812
722
  var count = parseInt(key[key.length - 1]);
813
723
  if (typeof count === 'number' && !isNaN(count)) {
814
724
  data.count = Math.max(data.count, 0) || 0;
815
725
  data.count = 10 * data.count + count;
816
- return {command: "null"};
726
+ return { command: "null" };
817
727
  }
818
728
  }
819
- if (modifier) key = modifier + key;
820
- if (data.keyChain) key = data.keyChain += " " + key;
729
+ if (modifier)
730
+ key = modifier + key;
731
+ if (data.keyChain)
732
+ key = data.keyChain += " " + key;
821
733
  var command = this.commandKeyBinding[key];
822
734
  data.keyChain = command == "null" ? key : "";
823
- if (!command) return undefined;
824
- if (command === "null") return {command: "null"};
825
-
735
+ if (!command)
736
+ return undefined;
737
+ if (command === "null")
738
+ return { command: "null" };
826
739
  if (command === "universalArgument") {
827
740
  data.count = -4;
828
- return {command: "null"};
741
+ return { command: "null" };
829
742
  }
830
743
  var args;
831
744
  if (typeof command !== "string") {
832
745
  args = command.args;
833
- if (command.command) command = command.command;
746
+ if (command.command)
747
+ command = command.command;
834
748
  if (command === "goorselect") {
835
749
  command = editor.emacsMark() ? args[1] : args[0];
836
750
  args = null;
837
751
  }
838
752
  }
839
-
840
753
  if (typeof command === "string") {
841
754
  if (command === "insertstring" ||
842
755
  command === "splitline" ||
@@ -844,15 +757,13 @@ exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
844
757
  editor.pushEmacsMark();
845
758
  }
846
759
  command = this.commands[command] || editor.commands.commands[command];
847
- if (!command) return undefined;
760
+ if (!command)
761
+ return undefined;
848
762
  }
849
-
850
763
  if (!command.readOnly && !command.isYank)
851
764
  data.lastCommand = null;
852
-
853
765
  if (!command.readOnly && editor.emacsMark())
854
766
  editor.setEmacsMark(null);
855
-
856
767
  if (data.count) {
857
768
  var count = data.count;
858
769
  data.count = 0;
@@ -860,147 +771,134 @@ exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
860
771
  return {
861
772
  args: args,
862
773
  command: {
863
- exec: function(editor, args) {
774
+ exec: function (editor, args) {
864
775
  for (var i = 0; i < count; i++)
865
776
  command.exec(editor, args);
866
777
  },
867
778
  multiSelectAction: command.multiSelectAction
868
779
  }
869
780
  };
870
- } else {
871
- if (!args) args = {};
872
- if (typeof args === 'object') args.count = count;
781
+ }
782
+ else {
783
+ if (!args)
784
+ args = {};
785
+ if (typeof args === 'object')
786
+ args.count = count;
873
787
  }
874
788
  }
875
-
876
- return {command: command, args: args};
789
+ return { command: command, args: args };
877
790
  };
878
-
879
791
  exports.emacsKeys = {
880
- "Up|C-p" : {command: "goorselect", args: ["golineup","selectup"]},
881
- "Down|C-n" : {command: "goorselect", args: ["golinedown","selectdown"]},
882
- "Left|C-b" : {command: "goorselect", args: ["gotoleft","selectleft"]},
883
- "Right|C-f" : {command: "goorselect", args: ["gotoright","selectright"]},
884
- "C-Left|M-b" : {command: "goorselect", args: ["gotowordleft","selectwordleft"]},
885
- "C-Right|M-f" : {command: "goorselect", args: ["gotowordright","selectwordright"]},
886
- "Home|C-a" : {command: "goorselect", args: ["gotolinestart","selecttolinestart"]},
887
- "End|C-e" : {command: "goorselect", args: ["gotolineend","selecttolineend"]},
888
- "C-Home|S-M-,": {command: "goorselect", args: ["gotostart","selecttostart"]},
889
- "C-End|S-M-." : {command: "goorselect", args: ["gotoend","selecttoend"]},
890
- "S-Up|S-C-p" : "selectup",
891
- "S-Down|S-C-n" : "selectdown",
892
- "S-Left|S-C-b" : "selectleft",
893
- "S-Right|S-C-f" : "selectright",
894
- "S-C-Left|S-M-b" : "selectwordleft",
895
- "S-C-Right|S-M-f" : "selectwordright",
896
- "S-Home|S-C-a" : "selecttolinestart",
897
- "S-End|S-C-e" : "selecttolineend",
898
- "S-C-Home" : "selecttostart",
899
- "S-C-End" : "selecttoend",
900
-
901
- "C-l" : "recenterTopBottom",
902
- "M-s" : "centerselection",
792
+ "Up|C-p": { command: "goorselect", args: ["golineup", "selectup"] },
793
+ "Down|C-n": { command: "goorselect", args: ["golinedown", "selectdown"] },
794
+ "Left|C-b": { command: "goorselect", args: ["gotoleft", "selectleft"] },
795
+ "Right|C-f": { command: "goorselect", args: ["gotoright", "selectright"] },
796
+ "C-Left|M-b": { command: "goorselect", args: ["gotowordleft", "selectwordleft"] },
797
+ "C-Right|M-f": { command: "goorselect", args: ["gotowordright", "selectwordright"] },
798
+ "Home|C-a": { command: "goorselect", args: ["gotolinestart", "selecttolinestart"] },
799
+ "End|C-e": { command: "goorselect", args: ["gotolineend", "selecttolineend"] },
800
+ "C-Home|S-M-,": { command: "goorselect", args: ["gotostart", "selecttostart"] },
801
+ "C-End|S-M-.": { command: "goorselect", args: ["gotoend", "selecttoend"] },
802
+ "S-Up|S-C-p": "selectup",
803
+ "S-Down|S-C-n": "selectdown",
804
+ "S-Left|S-C-b": "selectleft",
805
+ "S-Right|S-C-f": "selectright",
806
+ "S-C-Left|S-M-b": "selectwordleft",
807
+ "S-C-Right|S-M-f": "selectwordright",
808
+ "S-Home|S-C-a": "selecttolinestart",
809
+ "S-End|S-C-e": "selecttolineend",
810
+ "S-C-Home": "selecttostart",
811
+ "S-C-End": "selecttoend",
812
+ "C-l": "recenterTopBottom",
813
+ "M-s": "centerselection",
903
814
  "M-g": "gotoline",
904
815
  "C-x C-p": "selectall",
905
- "C-Down": {command: "goorselect", args: ["gotopagedown","selectpagedown"]},
906
- "C-Up": {command: "goorselect", args: ["gotopageup","selectpageup"]},
907
- "PageDown|C-v": {command: "goorselect", args: ["gotopagedown","selectpagedown"]},
908
- "PageUp|M-v": {command: "goorselect", args: ["gotopageup","selectpageup"]},
816
+ "C-Down": { command: "goorselect", args: ["gotopagedown", "selectpagedown"] },
817
+ "C-Up": { command: "goorselect", args: ["gotopageup", "selectpageup"] },
818
+ "PageDown|C-v": { command: "goorselect", args: ["gotopagedown", "selectpagedown"] },
819
+ "PageUp|M-v": { command: "goorselect", args: ["gotopageup", "selectpageup"] },
909
820
  "S-C-Down": "selectpagedown",
910
821
  "S-C-Up": "selectpageup",
911
-
912
822
  "C-s": "iSearch",
913
823
  "C-r": "iSearchBackwards",
914
-
915
824
  "M-C-s": "findnext",
916
825
  "M-C-r": "findprevious",
917
826
  "S-M-5": "replace",
918
827
  "Backspace": "backspace",
919
828
  "Delete|C-d": "del",
920
- "Return|C-m": {command: "insertstring", args: "\n"}, // "newline"
829
+ "Return|C-m": { command: "insertstring", args: "\n" },
921
830
  "C-o": "splitline",
922
-
923
- "M-d|C-Delete": {command: "killWord", args: "right"},
924
- "C-Backspace|M-Backspace|M-Delete": {command: "killWord", args: "left"},
831
+ "M-d|C-Delete": { command: "killWord", args: "right" },
832
+ "C-Backspace|M-Backspace|M-Delete": { command: "killWord", args: "left" },
925
833
  "C-k": "killLine",
926
-
927
834
  "C-y|S-Delete": "yank",
928
835
  "M-y": "yankRotate",
929
836
  "C-g": "keyboardQuit",
930
-
931
837
  "C-w|C-S-W": "killRegion",
932
838
  "M-w": "killRingSave",
933
839
  "C-Space": "setMark",
934
840
  "C-x C-x": "exchangePointAndMark",
935
-
936
841
  "C-t": "transposeletters",
937
- "M-u": "touppercase", // Doesn't work
842
+ "M-u": "touppercase",
938
843
  "M-l": "tolowercase",
939
- "M-/": "autocomplete", // Doesn't work
844
+ "M-/": "autocomplete",
940
845
  "C-u": "universalArgument",
941
-
942
846
  "M-;": "togglecomment",
943
-
944
847
  "C-/|C-x u|S-C--|C-z": "undo",
945
- "S-C-/|S-C-x u|C--|S-C-z": "redo", // infinite undo?
946
- "C-x r": "selectRectangularRegion",
947
- "M-x": {command: "focusCommandLine", args: "M-x "}
848
+ "S-C-/|S-C-x u|C--|S-C-z": "redo",
849
+ "C-x r": "selectRectangularRegion",
850
+ "M-x": { command: "focusCommandLine", args: "M-x " }
948
851
  };
949
-
950
-
951
852
  exports.handler.bindKeys(exports.emacsKeys);
952
-
953
853
  exports.handler.addCommands({
954
- recenterTopBottom: function(editor) {
854
+ recenterTopBottom: function (editor) {
955
855
  var renderer = editor.renderer;
956
856
  var pos = renderer.$cursorLayer.getPixelPosition();
957
857
  var h = renderer.$size.scrollerHeight - renderer.lineHeight;
958
858
  var scrollTop = renderer.scrollTop;
959
859
  if (Math.abs(pos.top - scrollTop) < 2) {
960
860
  scrollTop = pos.top - h;
961
- } else if (Math.abs(pos.top - scrollTop - h * 0.5) < 2) {
861
+ }
862
+ else if (Math.abs(pos.top - scrollTop - h * 0.5) < 2) {
962
863
  scrollTop = pos.top;
963
- } else {
864
+ }
865
+ else {
964
866
  scrollTop = pos.top - h * 0.5;
965
867
  }
966
868
  editor.session.setScrollTop(scrollTop);
967
869
  },
968
- selectRectangularRegion: function(editor) {
870
+ selectRectangularRegion: function (editor) {
969
871
  editor.multiSelect.toggleBlockSelection();
970
872
  },
971
- setMark: {
972
- exec: function(editor, args) {
973
-
873
+ setMark: {
874
+ exec: function (editor, args) {
974
875
  if (args && args.count) {
975
- if (editor.inMultiSelectMode) editor.forEachSelection(moveToMark);
976
- else moveToMark();
876
+ if (editor.inMultiSelectMode)
877
+ editor.forEachSelection(moveToMark);
878
+ else
879
+ moveToMark();
977
880
  moveToMark();
978
881
  return;
979
882
  }
980
-
981
- var mark = editor.emacsMark(),
982
- ranges = editor.selection.getAllRanges(),
983
- rangePositions = ranges.map(function(r) { return {row: r.start.row, column: r.start.column}; }),
984
- transientMarkModeActive = true,
985
- hasNoSelection = ranges.every(function(range) { return range.isEmpty(); });
883
+ var mark = editor.emacsMark(), ranges = editor.selection.getAllRanges(), rangePositions = ranges.map(function (r) { return { row: r.start.row, column: r.start.column }; }), transientMarkModeActive = true, hasNoSelection = ranges.every(function (range) { return range.isEmpty(); });
986
884
  if (transientMarkModeActive && (mark || !hasNoSelection)) {
987
- if (editor.inMultiSelectMode) editor.forEachSelection({exec: editor.clearSelection.bind(editor)});
988
- else editor.clearSelection();
989
- if (mark) editor.pushEmacsMark(null);
885
+ if (editor.inMultiSelectMode)
886
+ editor.forEachSelection({ exec: editor.clearSelection.bind(editor) });
887
+ else
888
+ editor.clearSelection();
889
+ if (mark)
890
+ editor.pushEmacsMark(null);
990
891
  return;
991
892
  }
992
-
993
893
  if (!mark) {
994
- rangePositions.forEach(function(pos) { editor.pushEmacsMark(pos); });
995
- editor.setEmacsMark(rangePositions[rangePositions.length-1]);
894
+ rangePositions.forEach(function (pos) { editor.pushEmacsMark(pos); });
895
+ editor.setEmacsMark(rangePositions[rangePositions.length - 1]);
996
896
  return;
997
897
  }
998
-
999
898
  function moveToMark() {
1000
899
  var mark = editor.popEmacsMark();
1001
900
  mark && editor.moveCursorToPosition(mark);
1002
901
  }
1003
-
1004
902
  },
1005
903
  readOnly: true,
1006
904
  handlesCount: true
@@ -1012,12 +910,12 @@ exports.handler.addCommands({
1012
910
  sel.setSelectionRange(sel.getRange(), !sel.isBackwards());
1013
911
  return;
1014
912
  }
1015
-
1016
913
  if (args.count) { // replace mark and point
1017
- var pos = {row: sel.lead.row, column: sel.lead.column};
914
+ var pos = { row: sel.lead.row, column: sel.lead.column };
1018
915
  sel.clearSelection();
1019
916
  sel.moveCursorToPosition(editor.emacsMarkForSelection(pos));
1020
- } else { // create selection to last mark
917
+ }
918
+ else { // create selection to last mark
1021
919
  sel.selectToPosition(editor.emacsMarkForSelection());
1022
920
  }
1023
921
  },
@@ -1026,30 +924,27 @@ exports.handler.addCommands({
1026
924
  multiSelectAction: "forEach"
1027
925
  },
1028
926
  killWord: {
1029
- exec: function(editor, dir) {
927
+ exec: function (editor, dir) {
1030
928
  editor.clearSelection();
1031
929
  if (dir == "left")
1032
930
  editor.selection.selectWordLeft();
1033
931
  else
1034
932
  editor.selection.selectWordRight();
1035
-
1036
933
  var range = editor.getSelectionRange();
1037
934
  var text = editor.session.getTextRange(range);
1038
935
  exports.killRing.add(text);
1039
-
1040
936
  editor.session.remove(range);
1041
937
  editor.clearSelection();
1042
938
  },
1043
939
  multiSelectAction: "forEach"
1044
940
  },
1045
- killLine: function(editor) {
941
+ killLine: function (editor) {
1046
942
  editor.pushEmacsMark(null);
1047
943
  editor.clearSelection();
1048
944
  var range = editor.getSelectionRange();
1049
945
  var line = editor.session.getLine(range.start.row);
1050
946
  range.end.column = line.length;
1051
947
  line = line.substr(range.start.column);
1052
-
1053
948
  var foldLine = editor.session.getFoldLine(range.start.row);
1054
949
  if (foldLine && range.end.row != foldLine.end.row) {
1055
950
  range.end.row = foldLine.end.row;
@@ -1065,15 +960,14 @@ exports.handler.addCommands({
1065
960
  exports.killRing.append(text);
1066
961
  else
1067
962
  exports.killRing.add(text);
1068
-
1069
963
  editor.session.remove(range);
1070
964
  editor.clearSelection();
1071
965
  },
1072
- yank: function(editor) {
966
+ yank: function (editor) {
1073
967
  editor.onPaste(exports.killRing.get() || '');
1074
968
  editor.keyBinding.$data.lastCommand = "yank";
1075
969
  },
1076
- yankRotate: function(editor) {
970
+ yankRotate: function (editor) {
1077
971
  if (editor.keyBinding.$data.lastCommand != "yank")
1078
972
  return;
1079
973
  editor.undo();
@@ -1082,7 +976,7 @@ exports.handler.addCommands({
1082
976
  editor.keyBinding.$data.lastCommand = "yank";
1083
977
  },
1084
978
  killRegion: {
1085
- exec: function(editor) {
979
+ exec: function (editor) {
1086
980
  exports.killRing.add(editor.getCopyText());
1087
981
  editor.commands.byName.cut.exec(editor);
1088
982
  editor.setEmacsMark(null);
@@ -1091,69 +985,66 @@ exports.handler.addCommands({
1091
985
  multiSelectAction: "forEach"
1092
986
  },
1093
987
  killRingSave: {
1094
- exec: function(editor) {
1095
-
988
+ exec: function (editor) {
1096
989
  editor.$handlesEmacsOnCopy = true;
1097
- var marks = editor.session.$emacsMarkRing.slice(),
1098
- deselectedMarks = [];
990
+ var marks = editor.session.$emacsMarkRing.slice(), deselectedMarks = [];
1099
991
  exports.killRing.add(editor.getCopyText());
1100
-
1101
- setTimeout(function() {
992
+ setTimeout(function () {
1102
993
  function deselect() {
1103
- var sel = editor.selection, range = sel.getRange(),
1104
- pos = sel.isBackwards() ? range.end : range.start;
1105
- deselectedMarks.push({row: pos.row, column: pos.column});
994
+ var sel = editor.selection, range = sel.getRange(), pos = sel.isBackwards() ? range.end : range.start;
995
+ deselectedMarks.push({ row: pos.row, column: pos.column });
1106
996
  sel.clearSelection();
1107
997
  }
1108
998
  editor.$handlesEmacsOnCopy = false;
1109
- if (editor.inMultiSelectMode) editor.forEachSelection({exec: deselect});
1110
- else deselect();
999
+ if (editor.inMultiSelectMode)
1000
+ editor.forEachSelection({ exec: deselect });
1001
+ else
1002
+ deselect();
1111
1003
  editor.setEmacsMark(null);
1112
1004
  editor.session.$emacsMarkRing = marks.concat(deselectedMarks.reverse());
1113
1005
  }, 0);
1114
1006
  },
1115
1007
  readOnly: true
1116
1008
  },
1117
- keyboardQuit: function(editor) {
1009
+ keyboardQuit: function (editor) {
1118
1010
  editor.selection.clearSelection();
1119
1011
  editor.setEmacsMark(null);
1120
1012
  editor.keyBinding.$data.count = null;
1121
1013
  },
1122
- focusCommandLine: function(editor, arg) {
1014
+ focusCommandLine: function (editor, arg) {
1123
1015
  if (editor.showCommandLine)
1124
1016
  editor.showCommandLine(arg);
1125
1017
  }
1126
1018
  });
1127
-
1128
1019
  exports.handler.addCommands(iSearchCommandModule.iSearchStartCommands);
1129
-
1130
1020
  var commands = exports.handler.commands;
1131
1021
  commands.yank.isYank = true;
1132
1022
  commands.yankRotate.isYank = true;
1133
-
1134
1023
  exports.killRing = {
1135
1024
  $data: [],
1136
- add: function(str) {
1025
+ add: function (str) {
1137
1026
  str && this.$data.push(str);
1138
1027
  if (this.$data.length > 30)
1139
1028
  this.$data.shift();
1140
1029
  },
1141
- append: function(str) {
1030
+ append: function (str) {
1142
1031
  var idx = this.$data.length - 1;
1143
1032
  var text = this.$data[idx] || "";
1144
- if (str) text += str;
1145
- if (text) this.$data[idx] = text;
1033
+ if (str)
1034
+ text += str;
1035
+ if (text)
1036
+ this.$data[idx] = text;
1146
1037
  },
1147
- get: function(n) {
1038
+ get: function (n) {
1148
1039
  n = n || 1;
1149
- return this.$data.slice(this.$data.length-n, this.$data.length).reverse().join('\n');
1040
+ return this.$data.slice(this.$data.length - n, this.$data.length).reverse().join('\n');
1150
1041
  },
1151
- pop: function() {
1042
+ pop: function () {
1152
1043
  if (this.$data.length > 1)
1153
1044
  this.$data.pop();
1154
1045
  return this.get();
1155
1046
  },
1156
- rotate: function() {
1047
+ rotate: function () {
1157
1048
  this.$data.unshift(this.$data.pop());
1158
1049
  return this.get();
1159
1050
  }