inc_gollum 4.1.2c

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1043) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.md +91 -0
  3. data/Gemfile +4 -0
  4. data/HISTORY.md +138 -0
  5. data/LICENSE +21 -0
  6. data/README.md +177 -0
  7. data/Rakefile +179 -0
  8. data/bin/inc_gollum +295 -0
  9. data/config.rb +11 -0
  10. data/config.ru +12 -0
  11. data/contrib/openrc/conf.d/gollum +3 -0
  12. data/contrib/openrc/init.d/gollum +36 -0
  13. data/contrib/systemd/gollum@.service +12 -0
  14. data/contrib/sysv-debian/init.d/gollum +79 -0
  15. data/gollum.gemspec +1089 -0
  16. data/lib/gollum.rb +41 -0
  17. data/lib/gollum/app.rb +652 -0
  18. data/lib/gollum/helpers.rb +68 -0
  19. data/lib/gollum/public/gollum/css/_styles.css +143 -0
  20. data/lib/gollum/public/gollum/css/dialog.css +253 -0
  21. data/lib/gollum/public/gollum/css/editor.css +697 -0
  22. data/lib/gollum/public/gollum/css/gollum.css +857 -0
  23. data/lib/gollum/public/gollum/css/ie7.css +75 -0
  24. data/lib/gollum/public/gollum/css/print.css +14 -0
  25. data/lib/gollum/public/gollum/css/template.css +882 -0
  26. data/lib/gollum/public/gollum/fonts/FontAwesome.otf +0 -0
  27. data/lib/gollum/public/gollum/fonts/fontawesome-webfont.eot +0 -0
  28. data/lib/gollum/public/gollum/fonts/fontawesome-webfont.svg +414 -0
  29. data/lib/gollum/public/gollum/fonts/fontawesome-webfont.ttf +0 -0
  30. data/lib/gollum/public/gollum/fonts/fontawesome-webfont.woff +0 -0
  31. data/lib/gollum/public/gollum/images/dirty-shade.png +0 -0
  32. data/lib/gollum/public/gollum/images/fileview/document.png +0 -0
  33. data/lib/gollum/public/gollum/images/fileview/folder-horizontal.png +0 -0
  34. data/lib/gollum/public/gollum/images/fileview/toggle-small-expand.png +0 -0
  35. data/lib/gollum/public/gollum/images/fileview/toggle-small.png +0 -0
  36. data/lib/gollum/public/gollum/images/fileview/trashcan.png +0 -0
  37. data/lib/gollum/public/gollum/images/icon-sprite.png +0 -0
  38. data/lib/gollum/public/gollum/images/man_24.png +0 -0
  39. data/lib/gollum/public/gollum/images/para.png +0 -0
  40. data/lib/gollum/public/gollum/images/pin-16.png +0 -0
  41. data/lib/gollum/public/gollum/images/pin-20.png +0 -0
  42. data/lib/gollum/public/gollum/images/pin-24.png +0 -0
  43. data/lib/gollum/public/gollum/images/pin-32.png +0 -0
  44. data/lib/gollum/public/gollum/javascript/editor/gollum.editor.js +1193 -0
  45. data/lib/gollum/public/gollum/javascript/editor/langs/asciidoc.js +183 -0
  46. data/lib/gollum/public/gollum/javascript/editor/langs/creole.js +105 -0
  47. data/lib/gollum/public/gollum/javascript/editor/langs/markdown.js +228 -0
  48. data/lib/gollum/public/gollum/javascript/editor/langs/org.js +174 -0
  49. data/lib/gollum/public/gollum/javascript/editor/langs/pod.js +112 -0
  50. data/lib/gollum/public/gollum/javascript/editor/langs/rdoc.js +74 -0
  51. data/lib/gollum/public/gollum/javascript/editor/langs/textile.js +176 -0
  52. data/lib/gollum/public/gollum/javascript/gollum.dialog.js +319 -0
  53. data/lib/gollum/public/gollum/javascript/gollum.js +333 -0
  54. data/lib/gollum/public/gollum/javascript/gollum.placeholder.js +54 -0
  55. data/lib/gollum/public/gollum/javascript/identicon_canvas.js +111 -0
  56. data/lib/gollum/public/gollum/javascript/jquery-1.7.2.min.js +4 -0
  57. data/lib/gollum/public/gollum/javascript/jquery.color.js +123 -0
  58. data/lib/gollum/public/gollum/javascript/mousetrap.min.js +8 -0
  59. data/lib/gollum/public/gollum/livepreview/css/custom.css +132 -0
  60. data/lib/gollum/public/gollum/livepreview/images/cancel_24.png +0 -0
  61. data/lib/gollum/public/gollum/livepreview/images/globe_24.png +0 -0
  62. data/lib/gollum/public/gollum/livepreview/images/lr_24.png +0 -0
  63. data/lib/gollum/public/gollum/livepreview/images/save_24.png +0 -0
  64. data/lib/gollum/public/gollum/livepreview/images/savecomment_24.png +0 -0
  65. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ace.js +129 -0
  66. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/anchor.js +245 -0
  67. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/anchor_test.js +223 -0
  68. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/autocomplete.js +497 -0
  69. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/autocomplete/popup.js +341 -0
  70. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/autocomplete/text_completer.js +78 -0
  71. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/autocomplete/util.js +74 -0
  72. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer.js +250 -0
  73. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer_test.js +85 -0
  74. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager.js +118 -0
  75. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager_test.js +199 -0
  76. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/default_commands.js +721 -0
  77. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/incremental_search_commands.js +232 -0
  78. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/multi_select_commands.js +113 -0
  79. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/occur_commands.js +110 -0
  80. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/config.js +202 -0
  81. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/config_test.js +135 -0
  82. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/css/codefolding-fold-button-states.png +0 -0
  83. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/css/editor.css +422 -0
  84. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/css/expand-marker.png +0 -0
  85. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/document.js +645 -0
  86. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/document_test.js +306 -0
  87. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session.js +2551 -0
  88. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session/bracket_match.js +221 -0
  89. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold.js +140 -0
  90. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold_line.js +269 -0
  91. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session/folding.js +859 -0
  92. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session_test.js +1075 -0
  93. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/editor.js +2693 -0
  94. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/editor_change_document_test.js +188 -0
  95. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/editor_highlight_selected_word_test.js +223 -0
  96. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/editor_navigation_test.js +164 -0
  97. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/editor_text_edit_test.js +557 -0
  98. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/beautify.js +57 -0
  99. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/beautify/php_rules.js +366 -0
  100. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/chromevox.js +980 -0
  101. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/elastic_tabstops_lite.js +319 -0
  102. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/emmet.js +434 -0
  103. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/error_marker.js +214 -0
  104. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/keybinding_menu.js +86 -0
  105. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/language_tools.js +226 -0
  106. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/linking.js +78 -0
  107. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/add_editor_menu_options.js +109 -0
  108. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/element_generator.js +148 -0
  109. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/generate_settings_menu.js +264 -0
  110. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/get_editor_keyboard_shortcuts.js +91 -0
  111. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/get_set_functions.js +141 -0
  112. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/overlay_page.js +116 -0
  113. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/settings_menu.css +48 -0
  114. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/modelist.js +195 -0
  115. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/old_ie.js +114 -0
  116. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/old_ie_test.js +77 -0
  117. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/searchbox.css +153 -0
  118. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/searchbox.js +308 -0
  119. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/settings_menu.js +76 -0
  120. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/spellcheck.js +69 -0
  121. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/split.js +40 -0
  122. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/static.css +31 -0
  123. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight.js +190 -0
  124. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight_test.js +96 -0
  125. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/statusbar.js +48 -0
  126. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/textarea.js +521 -0
  127. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/themelist.js +100 -0
  128. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/whitespace.js +213 -0
  129. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/whitespace_test.js +116 -0
  130. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/incremental_search.js +317 -0
  131. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/incremental_search_test.js +213 -0
  132. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/emacs.js +652 -0
  133. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/emacs_test.js +151 -0
  134. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/hash_handler.js +231 -0
  135. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/keybinding.js +145 -0
  136. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/keybinding_test.js +69 -0
  137. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/state_handler.js +249 -0
  138. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/textarea.js +82 -0
  139. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/textinput.js +509 -0
  140. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim.js +6016 -0
  141. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim_test.js +3866 -0
  142. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/cursor.js +240 -0
  143. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/font_metrics.js +176 -0
  144. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/gutter.js +287 -0
  145. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/marker.js +218 -0
  146. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/text.js +575 -0
  147. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/text_test.js +126 -0
  148. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/app_config.js +157 -0
  149. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/dom.js +284 -0
  150. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/es5-shim.js +1062 -0
  151. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/event.js +367 -0
  152. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/event_emitter.js +155 -0
  153. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/event_emitter_test.js +65 -0
  154. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/fixoldbrowsers.js +19 -0
  155. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/keys.js +163 -0
  156. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/lang.js +221 -0
  157. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/net.js +51 -0
  158. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/oop.js +57 -0
  159. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/regexp.js +113 -0
  160. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/useragent.js +106 -0
  161. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/line_widgets.js +297 -0
  162. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/Readme.md +9 -0
  163. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/highlight_rules_test.js +210 -0
  164. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/package.json +8 -0
  165. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_asciidoc.txt +111 -0
  166. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_coffee.txt +57 -0
  167. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_curly.txt +9 -0
  168. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_html.txt +10 -0
  169. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_javascript.txt +86 -0
  170. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_livescript.txt +1 -0
  171. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_lucene.txt +16 -0
  172. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_markdown.txt +22 -0
  173. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt +24 -0
  174. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_ruby.txt +34 -0
  175. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_xml.txt +7 -0
  176. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_abap.json +189 -0
  177. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_abc.json +2207 -0
  178. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_actionscript.json +263 -0
  179. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ada.json +39 -0
  180. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_asciidoc.json +422 -0
  181. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_assembly_x86.json +114 -0
  182. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_autohotkey.json +261 -0
  183. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_batchfile.json +70 -0
  184. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c9search.json +131 -0
  185. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c_cpp.json +190 -0
  186. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_cirru.json +267 -0
  187. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_clojure.json +162 -0
  188. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_cobol.json +4 -0
  189. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coffee.json +545 -0
  190. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coldfusion.json +26 -0
  191. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_csharp.json +31 -0
  192. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_css.json +148 -0
  193. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_curly.json +56 -0
  194. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_d.json +111 -0
  195. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_dart.json +368 -0
  196. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_diff.json +262 -0
  197. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_dot.json +2254 -0
  198. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_eiffel.json +141 -0
  199. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ejs.json +296 -0
  200. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_elixir.json +196 -0
  201. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_elm.json +198 -0
  202. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_erlang.json +166 -0
  203. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_forth.json +219 -0
  204. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ftl.json +341 -0
  205. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_gcode.json +296 -0
  206. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_gherkin.json +142 -0
  207. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_gitignore.json +33 -0
  208. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_glsl.json +127 -0
  209. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_golang.json +256 -0
  210. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_groovy.json +410 -0
  211. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haml.json +174 -0
  212. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_handlebars.json +81 -0
  213. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haskell.json +156 -0
  214. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haxe.json +143 -0
  215. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_html.json +63 -0
  216. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_html_ruby.json +257 -0
  217. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ini.json +23 -0
  218. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_io.json +49 -0
  219. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jack.json +1786 -0
  220. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jade.json +188 -0
  221. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_java.json +95 -0
  222. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_javascript.json +593 -0
  223. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_json.json +412 -0
  224. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsoniq.json +4 -0
  225. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsp.json +435 -0
  226. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsx.json +51 -0
  227. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_julia.json +111 -0
  228. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_latex.json +127 -0
  229. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_less.json +204 -0
  230. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_liquid.json +551 -0
  231. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lisp.json +248 -0
  232. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_livescript.json +6 -0
  233. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_logiql.json +190 -0
  234. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lsl.json +503 -0
  235. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lua.json +348 -0
  236. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_luapage.json +633 -0
  237. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lucene.json +92 -0
  238. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_markdown.json +114 -0
  239. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_mask.json +302 -0
  240. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_matlab.json +90 -0
  241. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_mel.json +257 -0
  242. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_mushcode.json +790 -0
  243. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_mysql.json +4 -0
  244. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_nix.json +360 -0
  245. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_objectivec.json +793 -0
  246. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ocaml.json +200 -0
  247. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_pascal.json +297 -0
  248. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_perl.json +227 -0
  249. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_pgsql.json +889 -0
  250. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_php.json +171 -0
  251. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_powershell.json +184 -0
  252. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_prolog.json +245 -0
  253. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_properties.json +68 -0
  254. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_protobuf.json +136 -0
  255. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_python.json +152 -0
  256. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_r.json +235 -0
  257. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_rdoc.json +441 -0
  258. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_rhtml.json +106 -0
  259. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ruby.json +242 -0
  260. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_rust.json +136 -0
  261. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sass.json +229 -0
  262. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scad.json +194 -0
  263. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scala.json +542 -0
  264. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scheme.json +216 -0
  265. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scss.json +123 -0
  266. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sh.json +334 -0
  267. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sjs.json +276 -0
  268. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_smarty.json +98 -0
  269. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_snippets.json +159 -0
  270. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_soy_template.json +286 -0
  271. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_space.json +322 -0
  272. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sql.json +54 -0
  273. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_stylus.json +271 -0
  274. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_svg.json +684 -0
  275. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_tcl.json +385 -0
  276. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_tex.json +130 -0
  277. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_text.json +29 -0
  278. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_textile.json +113 -0
  279. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_toml.json +131 -0
  280. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_twig.json +288 -0
  281. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_typescript.json +559 -0
  282. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_vala.json +158 -0
  283. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_vbscript.json +205 -0
  284. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_velocity.json +285 -0
  285. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_verilog.json +113 -0
  286. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_vhdl.json +271 -0
  287. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xml.json +43 -0
  288. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xquery.json +44 -0
  289. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_yaml.json +150 -0
  290. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/abap.js +77 -0
  291. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/abap_highlight_rules.js +134 -0
  292. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/abc.js +58 -0
  293. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/abc_highlight_rules.js +114 -0
  294. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/actionscript.js +58 -0
  295. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/actionscript_highlight_rules.js +141 -0
  296. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ada.js +54 -0
  297. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ada_highlight_rules.js +93 -0
  298. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/apache_conf.js +62 -0
  299. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/apache_conf_highlight_rules.js +231 -0
  300. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/applescript.js +55 -0
  301. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/applescript_highlight_rules.js +139 -0
  302. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/asciidoc.js +64 -0
  303. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/asciidoc_highlight_rules.js +234 -0
  304. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/assembly_x86.js +56 -0
  305. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/assembly_x86_highlight_rules.js +114 -0
  306. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/autohotkey.js +57 -0
  307. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/autohotkey_highlight_rules.js +107 -0
  308. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/batchfile.js +61 -0
  309. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/batchfile_highlight_rules.js +97 -0
  310. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour.js +90 -0
  311. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/behaviour_test.js +139 -0
  312. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/css.js +108 -0
  313. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/cstyle.js +392 -0
  314. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/html.js +46 -0
  315. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xml.js +202 -0
  316. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xquery.js +92 -0
  317. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/c9search.js +67 -0
  318. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/c9search_highlight_rules.js +182 -0
  319. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp.js +101 -0
  320. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp_highlight_rules.js +196 -0
  321. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/cirru.js +51 -0
  322. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/cirru_highlight_rules.js +125 -0
  323. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/clojure.js +128 -0
  324. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/clojure_highlight_rules.js +200 -0
  325. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/cobol.js +53 -0
  326. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/cobol_highlight_rules.js +100 -0
  327. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee.js +135 -0
  328. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/coffee-script.js +62 -0
  329. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/helpers.js +271 -0
  330. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/lexer.js +935 -0
  331. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/nodes.js +3106 -0
  332. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser.js +724 -0
  333. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser_test.js +88 -0
  334. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/rewriter.js +516 -0
  335. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/scope.js +174 -0
  336. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules.js +233 -0
  337. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_worker.js +73 -0
  338. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion.js +61 -0
  339. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_highlight_rules.js +49 -0
  340. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_test.js +67 -0
  341. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/csharp.js +61 -0
  342. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/csharp_highlight_rules.js +93 -0
  343. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css.js +100 -0
  344. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css/csslint.js +9628 -0
  345. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules.js +179 -0
  346. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css_test.js +78 -0
  347. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker.js +100 -0
  348. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker_test.js +68 -0
  349. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/curly.js +63 -0
  350. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/curly_highlight_rules.js +66 -0
  351. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/d.js +56 -0
  352. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/d_highlight_rules.js +334 -0
  353. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dart.js +62 -0
  354. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dart_highlight_rules.js +186 -0
  355. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/diff.js +52 -0
  356. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/diff_highlight_rules.js +108 -0
  357. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/django.js +119 -0
  358. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/doc_comment_highlight_rules.js +79 -0
  359. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dockerfile.js +52 -0
  360. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dockerfile_highlight_rules.js +57 -0
  361. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dot.js +55 -0
  362. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dot_highlight_rules.js +126 -0
  363. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/eiffel.js +52 -0
  364. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/eiffel_highlight_rules.js +136 -0
  365. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ejs.js +109 -0
  366. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/elixir.js +58 -0
  367. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/elixir_highlight_rules.js +433 -0
  368. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/elm.js +58 -0
  369. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/elm_highlight_rules.js +162 -0
  370. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/erlang.js +57 -0
  371. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/erlang_highlight_rules.js +876 -0
  372. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/asciidoc.js +142 -0
  373. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/c9search.js +83 -0
  374. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/coffee.js +120 -0
  375. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/coffee_test.js +101 -0
  376. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/csharp.js +137 -0
  377. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle.js +186 -0
  378. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle_test.js +109 -0
  379. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/diff.js +69 -0
  380. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/fold_mode.js +120 -0
  381. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html.js +48 -0
  382. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html_test.js +186 -0
  383. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/ini.js +80 -0
  384. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/latex.js +162 -0
  385. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/lua.js +163 -0
  386. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/markdown.js +125 -0
  387. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/mixed.js +83 -0
  388. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/pythonic.js +58 -0
  389. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/pythonic_test.js +98 -0
  390. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/velocity.js +120 -0
  391. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/xml.js +278 -0
  392. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/xml_test.js +110 -0
  393. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/forth.js +58 -0
  394. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/forth_highlight_rules.js +164 -0
  395. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ftl.js +49 -0
  396. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ftl_highlight_rules.js +195 -0
  397. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gcode.js +51 -0
  398. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gcode_highlight_rules.js +94 -0
  399. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gherkin.js +80 -0
  400. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gherkin_highlight_rules.js +113 -0
  401. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gitignore.js +20 -0
  402. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gitignore_highlight_rules.js +31 -0
  403. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/glsl.js +56 -0
  404. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/glsl_highlight_rules.js +81 -0
  405. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/golang.js +55 -0
  406. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/golang_highlight_rules.js +108 -0
  407. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/groovy.js +24 -0
  408. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/groovy_highlight_rules.js +173 -0
  409. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haml.js +61 -0
  410. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haml_highlight_rules.js +132 -0
  411. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/handlebars.js +29 -0
  412. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/handlebars_highlight_rules.js +72 -0
  413. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haskell.js +62 -0
  414. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haskell_highlight_rules.js +246 -0
  415. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haxe.js +56 -0
  416. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haxe_highlight_rules.js +98 -0
  417. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html.js +106 -0
  418. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html/saxparser.js +10430 -0
  419. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_completions.js +305 -0
  420. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules.js +111 -0
  421. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_ruby.js +59 -0
  422. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_ruby_highlight_rules.js +84 -0
  423. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_test.js +67 -0
  424. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_worker.js +92 -0
  425. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ini.js +53 -0
  426. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ini_highlight_rules.js +112 -0
  427. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/io.js +58 -0
  428. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/io_highlight_rules.js +120 -0
  429. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jack.js +79 -0
  430. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jack_highlight_rules.js +142 -0
  431. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jade.js +57 -0
  432. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jade_highlight_rules.js +341 -0
  433. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/java.js +24 -0
  434. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/java_highlight_rules.js +128 -0
  435. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript.js +116 -0
  436. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript/jshint.js +10846 -0
  437. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules.js +405 -0
  438. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_test.js +213 -0
  439. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker.js +185 -0
  440. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker_test.js +106 -0
  441. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/js_regex_highlight_rules.js +94 -0
  442. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json.js +93 -0
  443. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json/json_parse.js +346 -0
  444. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json_highlight_rules.js +100 -0
  445. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker.js +67 -0
  446. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker_test.js +102 -0
  447. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsoniq.js +203 -0
  448. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsp.js +55 -0
  449. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsp_highlight_rules.js +91 -0
  450. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsx.js +56 -0
  451. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsx_highlight_rules.js +120 -0
  452. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/julia.js +62 -0
  453. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/julia_highlight_rules.js +170 -0
  454. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex.js +26 -0
  455. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js +73 -0
  456. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/less.js +84 -0
  457. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/less_highlight_rules.js +271 -0
  458. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/liquid.js +82 -0
  459. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules.js +131 -0
  460. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lisp.js +56 -0
  461. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lisp_highlight_rules.js +124 -0
  462. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/livescript.js +246 -0
  463. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/logiql.js +139 -0
  464. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/logiql_highlight_rules.js +119 -0
  465. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/logiql_test.js +98 -0
  466. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lsl.js +92 -0
  467. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lsl_highlight_rules.js +123 -0
  468. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lua.js +168 -0
  469. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lua/luaparse.js +1989 -0
  470. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lua_highlight_rules.js +193 -0
  471. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lua_worker.js +70 -0
  472. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/luapage.js +24 -0
  473. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/luapage_highlight_rules.js +49 -0
  474. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lucene.js +19 -0
  475. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lucene_highlight_rules.js +49 -0
  476. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/makefile.js +58 -0
  477. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/makefile_highlight_rules.js +75 -0
  478. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/markdown.js +76 -0
  479. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules.js +228 -0
  480. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mask.js +84 -0
  481. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mask_highlight_rules.js +309 -0
  482. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/matching_brace_outdent.js +69 -0
  483. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/matching_parens_outdent.js +74 -0
  484. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/matlab.js +55 -0
  485. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/matlab_highlight_rules.js +262 -0
  486. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mel.js +56 -0
  487. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mel_highlight_rules.js +133 -0
  488. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mushcode.js +116 -0
  489. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mushcode_highlight_rules.js +569 -0
  490. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mysql.js +51 -0
  491. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mysql_highlight_rules.js +122 -0
  492. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/nix.js +62 -0
  493. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/nix_highlight_rules.js +119 -0
  494. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/objectivec.js +61 -0
  495. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/objectivec_highlight_rules.js +331 -0
  496. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml.js +97 -0
  497. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml_highlight_rules.js +337 -0
  498. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/pascal.js +67 -0
  499. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/pascal_highlight_rules.js +127 -0
  500. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/perl.js +90 -0
  501. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/perl_highlight_rules.js +165 -0
  502. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql.js +59 -0
  503. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql_highlight_rules.js +619 -0
  504. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php.js +161 -0
  505. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php/php.js +5031 -0
  506. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php_highlight_rules.js +1085 -0
  507. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php_test.js +65 -0
  508. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php_worker.js +77 -0
  509. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/plain_text.js +55 -0
  510. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/plain_text_test.js +56 -0
  511. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/powershell.js +61 -0
  512. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/powershell_highlight_rules.js +145 -0
  513. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/praat.js +84 -0
  514. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/praat_highlight_rules.js +262 -0
  515. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/prolog.js +62 -0
  516. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/prolog_highlight_rules.js +238 -0
  517. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/properties.js +48 -0
  518. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/properties_highlight_rules.js +86 -0
  519. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/protobuf.js +63 -0
  520. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/protobuf_highlight_rules.js +66 -0
  521. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/python.js +113 -0
  522. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/python_highlight_rules.js +191 -0
  523. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/python_test.js +79 -0
  524. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/r.js +154 -0
  525. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/r_highlight_rules.js +208 -0
  526. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rdoc.js +61 -0
  527. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rdoc_highlight_rules.js +119 -0
  528. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rhtml.js +87 -0
  529. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rhtml_highlight_rules.js +66 -0
  530. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ruby.js +100 -0
  531. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules.js +326 -0
  532. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_test.js +77 -0
  533. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rust.js +58 -0
  534. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rust_highlight_rules.js +158 -0
  535. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sass.js +52 -0
  536. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sass_highlight_rules.js +79 -0
  537. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scad.js +99 -0
  538. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scad_highlight_rules.js +142 -0
  539. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scala.js +25 -0
  540. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scala_highlight_rules.js +160 -0
  541. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scheme.js +56 -0
  542. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scheme_highlight_rules.js +123 -0
  543. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scss.js +84 -0
  544. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scss_highlight_rules.js +296 -0
  545. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sh.js +116 -0
  546. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sh_highlight_rules.js +203 -0
  547. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sjs.js +56 -0
  548. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sjs_highlight_rules.js +233 -0
  549. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/smarty.js +51 -0
  550. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/smarty_highlight_rules.js +139 -0
  551. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/snippets.js +113 -0
  552. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/soy_template.js +60 -0
  553. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/soy_template_highlight_rules.js +356 -0
  554. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/space.js +21 -0
  555. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/space_highlight_rules.js +56 -0
  556. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sql.js +53 -0
  557. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sql_highlight_rules.js +99 -0
  558. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/stylus.js +62 -0
  559. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/stylus_highlight_rules.js +165 -0
  560. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/svg.js +69 -0
  561. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/svg_highlight_rules.js +49 -0
  562. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/tcl.js +84 -0
  563. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/tcl_highlight_rules.js +172 -0
  564. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/tex.js +68 -0
  565. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/tex_highlight_rules.js +127 -0
  566. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/text.js +386 -0
  567. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/text_highlight_rules.js +234 -0
  568. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/text_test.js +64 -0
  569. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/textile.js +67 -0
  570. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/textile_highlight_rules.js +93 -0
  571. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/toml.js +56 -0
  572. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/toml_highlight_rules.js +103 -0
  573. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/twig.js +81 -0
  574. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/twig_highlight_rules.js +166 -0
  575. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/typescript.js +62 -0
  576. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/typescript_highlight_rules.js +98 -0
  577. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vala.js +105 -0
  578. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vala_highlight_rules.js +457 -0
  579. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vbscript.js +60 -0
  580. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vbscript_highlight_rules.js +246 -0
  581. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/velocity.js +58 -0
  582. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/velocity_highlight_rules.js +177 -0
  583. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/verilog.js +54 -0
  584. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/verilog_highlight_rules.js +101 -0
  585. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vhdl.js +52 -0
  586. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vhdl_highlight_rules.js +115 -0
  587. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml.js +75 -0
  588. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml/dom-parser.js +260 -0
  589. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml/dom.js +1138 -0
  590. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml/sax.js +592 -0
  591. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules.js +242 -0
  592. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_test.js +75 -0
  593. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_worker.js +92 -0
  594. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery.js +216 -0
  595. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/Readme.md +1 -0
  596. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/jsoniq_lexer.js +4453 -0
  597. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/xqlint.js +78911 -0
  598. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/xquery_lexer.js +4422 -0
  599. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_worker.js +114 -0
  600. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/yaml.js +78 -0
  601. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/yaml_highlight_rules.js +113 -0
  602. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/model/editor.js +62 -0
  603. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/default_gutter_handler.js +181 -0
  604. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/default_handlers.js +279 -0
  605. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/dragdrop_handler.js +428 -0
  606. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/fold_handler.js +93 -0
  607. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_event.js +129 -0
  608. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_handler.js +205 -0
  609. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_handler_test.js +77 -0
  610. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/multi_select_handler.js +211 -0
  611. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/multi_select.js +970 -0
  612. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/multi_select_test.js +269 -0
  613. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/occur.js +193 -0
  614. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/occur_test.js +154 -0
  615. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/placeholder.js +274 -0
  616. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/placeholder_test.js +157 -0
  617. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/range.js +549 -0
  618. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/range_list.js +240 -0
  619. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/range_list_test.js +182 -0
  620. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/range_test.js +191 -0
  621. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/renderloop.js +75 -0
  622. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/requirejs/text.js +52 -0
  623. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/requirejs/text_build.js +60 -0
  624. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/scrollbar.js +270 -0
  625. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/search.js +403 -0
  626. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/search_highlight.js +82 -0
  627. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/search_test.js +494 -0
  628. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/selection.js +955 -0
  629. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/selection_test.js +480 -0
  630. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets.js +949 -0
  631. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/_.snippets +240 -0
  632. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/_all_modes.js +7 -0
  633. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/_all_modes.snippets +0 -0
  634. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/abap.js +7 -0
  635. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/abap.snippets +0 -0
  636. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/abc.js +7 -0
  637. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/abc.snippets +31 -0
  638. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/actionscript.js +7 -0
  639. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/actionscript.snippets +157 -0
  640. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ada.js +7 -0
  641. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ada.snippets +0 -0
  642. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/all_modes.js +7 -0
  643. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/all_modes.snippets +0 -0
  644. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/apache.snippets +35 -0
  645. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/apache_conf.js +7 -0
  646. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/apache_conf.snippets +0 -0
  647. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/applescript.js +7 -0
  648. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/applescript.snippets +0 -0
  649. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/asciidoc.js +7 -0
  650. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/asciidoc.snippets +0 -0
  651. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/assembly_x86.js +7 -0
  652. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/assembly_x86.snippets +0 -0
  653. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/autohotkey.js +7 -0
  654. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/autohotkey.snippets +0 -0
  655. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/autoit.snippets +66 -0
  656. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/batchfile.js +7 -0
  657. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/batchfile.snippets +0 -0
  658. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c.snippets +235 -0
  659. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c9search.js +7 -0
  660. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c9search.snippets +0 -0
  661. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c_cpp.js +7 -0
  662. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c_cpp.snippets +131 -0
  663. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/chef.snippets +204 -0
  664. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cirru.js +7 -0
  665. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cirru.snippets +0 -0
  666. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/clojure.js +7 -0
  667. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/clojure.snippets +90 -0
  668. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cmake.snippets +58 -0
  669. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cobol.js +7 -0
  670. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cobol.snippets +0 -0
  671. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/coffee.js +7 -0
  672. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/coffee.snippets +95 -0
  673. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/coldfusion.js +7 -0
  674. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/coldfusion.snippets +0 -0
  675. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cs.snippets +374 -0
  676. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/csharp.js +7 -0
  677. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/csharp.snippets +0 -0
  678. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/css.js +7 -0
  679. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/css.snippets +967 -0
  680. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/curly.js +7 -0
  681. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/curly.snippets +0 -0
  682. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/d.js +7 -0
  683. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/d.snippets +0 -0
  684. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dart.js +7 -0
  685. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dart.snippets +83 -0
  686. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/diff.js +7 -0
  687. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/diff.snippets +11 -0
  688. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/django.js +7 -0
  689. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/django.snippets +108 -0
  690. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dockerfile.js +7 -0
  691. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dockerfile.snippets +0 -0
  692. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dot.js +7 -0
  693. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dot.snippets +0 -0
  694. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dummy.js +7 -0
  695. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dummy_syntax.js +7 -0
  696. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/eiffel.js +7 -0
  697. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/eiffel.snippets +0 -0
  698. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ejs.js +7 -0
  699. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ejs.snippets +0 -0
  700. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/elixir.js +7 -0
  701. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/elixir.snippets +0 -0
  702. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/elm.js +7 -0
  703. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/elm.snippets +0 -0
  704. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/erlang.js +7 -0
  705. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/erlang.snippets +160 -0
  706. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/eruby.snippets +113 -0
  707. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/falcon.snippets +71 -0
  708. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/forth.js +7 -0
  709. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/forth.snippets +0 -0
  710. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ftl.js +7 -0
  711. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ftl.snippets +0 -0
  712. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gcode.js +7 -0
  713. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gcode.snippets +0 -0
  714. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gherkin.js +7 -0
  715. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gherkin.snippets +0 -0
  716. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gitignore.js +7 -0
  717. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gitignore.snippets +0 -0
  718. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/glsl.js +7 -0
  719. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/glsl.snippets +0 -0
  720. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/go.snippets +201 -0
  721. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/golang.js +7 -0
  722. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/golang.snippets +0 -0
  723. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/groovy.js +7 -0
  724. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/groovy.snippets +0 -0
  725. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haml.js +7 -0
  726. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haml.snippets +20 -0
  727. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/handlebars.js +7 -0
  728. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/handlebars.snippets +0 -0
  729. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haskell.js +7 -0
  730. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haskell.snippets +82 -0
  731. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haxe.js +7 -0
  732. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haxe.snippets +0 -0
  733. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/html.js +7 -0
  734. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/html.snippets +828 -0
  735. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/html_ruby.js +7 -0
  736. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/html_ruby.snippets +0 -0
  737. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/htmldjango.snippets +136 -0
  738. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/htmltornado.snippets +55 -0
  739. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ini.js +7 -0
  740. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ini.snippets +0 -0
  741. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/io.js +69 -0
  742. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/io.snippets +0 -0
  743. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jack.js +7 -0
  744. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jack.snippets +0 -0
  745. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jade.js +7 -0
  746. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jade.snippets +0 -0
  747. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/java.js +7 -0
  748. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/java.snippets +240 -0
  749. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/javascript-jquery.snippets +589 -0
  750. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/javascript.js +7 -0
  751. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/javascript.snippets +195 -0
  752. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/json.js +7 -0
  753. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/json.snippets +0 -0
  754. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsoniq.js +7 -0
  755. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsoniq.snippets +61 -0
  756. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsp.js +7 -0
  757. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsp.snippets +99 -0
  758. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsx.js +7 -0
  759. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsx.snippets +0 -0
  760. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/julia.js +7 -0
  761. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/julia.snippets +0 -0
  762. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/latex.js +7 -0
  763. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/latex.snippets +0 -0
  764. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ledger.snippets +5 -0
  765. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/less.js +7 -0
  766. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/less.snippets +0 -0
  767. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/liquid.js +7 -0
  768. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/liquid.snippets +0 -0
  769. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lisp.js +7 -0
  770. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lisp.snippets +0 -0
  771. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/livescript.js +7 -0
  772. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/livescript.snippets +0 -0
  773. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/logiql.js +7 -0
  774. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/logiql.snippets +0 -0
  775. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lsl.js +7 -0
  776. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lsl.snippets +1066 -0
  777. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lua.js +7 -0
  778. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lua.snippets +21 -0
  779. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/luapage.js +7 -0
  780. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/luapage.snippets +0 -0
  781. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lucene.js +7 -0
  782. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lucene.snippets +0 -0
  783. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/makefile.js +7 -0
  784. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/makefile.snippets +4 -0
  785. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mako.snippets +54 -0
  786. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/markdown.js +7 -0
  787. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/markdown.snippets +88 -0
  788. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/matlab.js +7 -0
  789. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/matlab.snippets +0 -0
  790. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mel.js +7 -0
  791. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mel.snippets +0 -0
  792. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mushcode.js +7 -0
  793. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mushcode.snippets +0 -0
  794. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mushcode_high_rules.js +7 -0
  795. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mushcode_high_rules.snippets +0 -0
  796. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mysql.js +7 -0
  797. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mysql.snippets +0 -0
  798. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/nix.js +7 -0
  799. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/nix.snippets +0 -0
  800. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/objc.snippets +247 -0
  801. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/objectivec.js +7 -0
  802. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/objectivec.snippets +0 -0
  803. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ocaml.js +7 -0
  804. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ocaml.snippets +0 -0
  805. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/pascal.js +7 -0
  806. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/pascal.snippets +0 -0
  807. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/perl.js +7 -0
  808. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/perl.snippets +347 -0
  809. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/pgsql.js +7 -0
  810. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/pgsql.snippets +0 -0
  811. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/php.js +7 -0
  812. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/php.snippets +377 -0
  813. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/plain_text.js +7 -0
  814. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/plain_text.snippets +0 -0
  815. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/powershell.js +7 -0
  816. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/powershell.snippets +0 -0
  817. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/praat.js +7 -0
  818. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/praat.snippets +0 -0
  819. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/prolog.js +7 -0
  820. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/prolog.snippets +0 -0
  821. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/properties.js +7 -0
  822. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/properties.snippets +0 -0
  823. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/protobuf.js +7 -0
  824. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/protobuf.snippets +0 -0
  825. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/python.js +7 -0
  826. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/python.snippets +158 -0
  827. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/r.js +7 -0
  828. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/r.snippets +121 -0
  829. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rdoc.js +7 -0
  830. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rdoc.snippets +0 -0
  831. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rhtml.js +7 -0
  832. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rhtml.snippets +0 -0
  833. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rst.snippets +22 -0
  834. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ruby.js +7 -0
  835. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ruby.snippets +928 -0
  836. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rust.js +7 -0
  837. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rust.snippets +0 -0
  838. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sass.js +7 -0
  839. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sass.snippets +0 -0
  840. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scad.js +7 -0
  841. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scad.snippets +0 -0
  842. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scala.js +7 -0
  843. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scala.snippets +0 -0
  844. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scheme.js +7 -0
  845. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scheme.snippets +0 -0
  846. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scss.js +7 -0
  847. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scss.snippets +0 -0
  848. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sh.js +7 -0
  849. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sh.snippets +83 -0
  850. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sjs.js +7 -0
  851. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sjs.snippets +0 -0
  852. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/smarty.js +7 -0
  853. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/smarty.snippets +0 -0
  854. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/snippets.js +7 -0
  855. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/snippets.snippets +9 -0
  856. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/soy_template.js +7 -0
  857. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/soy_template.snippets +0 -0
  858. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/space.js +7 -0
  859. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/space.snippets +0 -0
  860. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sql.js +7 -0
  861. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sql.snippets +26 -0
  862. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/stylus.js +7 -0
  863. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/stylus.snippets +0 -0
  864. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/svg.js +7 -0
  865. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/svg.snippets +0 -0
  866. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tcl.js +7 -0
  867. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tcl.snippets +92 -0
  868. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tex.js +7 -0
  869. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tex.snippets +191 -0
  870. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/text.js +7 -0
  871. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/text.snippets +0 -0
  872. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/textile.js +7 -0
  873. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/textile.snippets +30 -0
  874. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tmsnippet.snippets +0 -0
  875. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/toml.js +7 -0
  876. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/toml.snippets +0 -0
  877. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/twig.js +7 -0
  878. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/twig.snippets +0 -0
  879. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/typescript.js +7 -0
  880. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/typescript.snippets +0 -0
  881. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vala.js +195 -0
  882. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vala.snippets +0 -0
  883. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vbscript.js +7 -0
  884. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vbscript.snippets +0 -0
  885. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/velocity.js +8 -0
  886. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/velocity.snippets +28 -0
  887. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/verilog.js +7 -0
  888. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/verilog.snippets +0 -0
  889. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vhdl.js +7 -0
  890. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vhdl.snippets +0 -0
  891. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xml.js +7 -0
  892. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xml.snippets +0 -0
  893. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xquery.js +7 -0
  894. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xquery.snippets +61 -0
  895. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xslt.snippets +97 -0
  896. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/yaml.js +7 -0
  897. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/yaml.snippets +0 -0
  898. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets_test.js +131 -0
  899. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/split.js +373 -0
  900. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/all.js +35 -0
  901. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/all_browser.js +150 -0
  902. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/assertions.js +56 -0
  903. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/asyncjs/assert.js +313 -0
  904. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/asyncjs/async.js +529 -0
  905. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/asyncjs/index.js +13 -0
  906. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/asyncjs/test.js +195 -0
  907. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/asyncjs/utils.js +65 -0
  908. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/benchmark.js +78 -0
  909. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/mockdom.js +10 -0
  910. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/mockrenderer.js +208 -0
  911. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/tests.html +46 -0
  912. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/ambiance.css +221 -0
  913. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/ambiance.js +33 -0
  914. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/chaos.css +154 -0
  915. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/chaos.js +33 -0
  916. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/chrome.css +154 -0
  917. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/chrome.js +39 -0
  918. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.css +112 -0
  919. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.js +39 -0
  920. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.css +113 -0
  921. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.js +39 -0
  922. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.css +134 -0
  923. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.js +39 -0
  924. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.css +143 -0
  925. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.js +39 -0
  926. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.css +127 -0
  927. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.js +39 -0
  928. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.css +176 -0
  929. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.js +38 -0
  930. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/eclipse.css +113 -0
  931. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/eclipse.js +41 -0
  932. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/github.css +119 -0
  933. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/github.js +39 -0
  934. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.css +113 -0
  935. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.js +39 -0
  936. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/katzenmilch.css +140 -0
  937. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/katzenmilch.js +39 -0
  938. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.css +124 -0
  939. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.js +39 -0
  940. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/kuroir.css +67 -0
  941. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/kuroir.js +39 -0
  942. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.css +110 -0
  943. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.js +39 -0
  944. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.css +111 -0
  945. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.js +39 -0
  946. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.css +126 -0
  947. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.js +39 -0
  948. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.css +122 -0
  949. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.js +39 -0
  950. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.css +129 -0
  951. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.js +39 -0
  952. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.css +101 -0
  953. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.js +39 -0
  954. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.css +106 -0
  955. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.js +39 -0
  956. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/terminal.css +132 -0
  957. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/terminal.js +39 -0
  958. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/textmate.css +155 -0
  959. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/textmate.js +40 -0
  960. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.css +125 -0
  961. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.js +39 -0
  962. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.css +125 -0
  963. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.js +39 -0
  964. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.css +122 -0
  965. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.js +39 -0
  966. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.css +141 -0
  967. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.js +39 -0
  968. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.css +125 -0
  969. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.js +39 -0
  970. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.css +128 -0
  971. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.js +39 -0
  972. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.css +110 -0
  973. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.js +39 -0
  974. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/xcode.css +103 -0
  975. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/xcode.js +39 -0
  976. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/token_iterator.js +150 -0
  977. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/token_iterator_test.js +212 -0
  978. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/tokenizer.js +362 -0
  979. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/tokenizer_dev.js +183 -0
  980. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/tokenizer_test.js +97 -0
  981. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/tooltip.js +138 -0
  982. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/undomanager.js +168 -0
  983. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/unicode.js +107 -0
  984. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/virtual_renderer.js +1764 -0
  985. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/virtual_renderer_test.js +86 -0
  986. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/mirror.js +49 -0
  987. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/worker.js +193 -0
  988. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/worker_client.js +255 -0
  989. data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/worker_test.js +125 -0
  990. data/lib/gollum/public/gollum/livepreview/js/jquery.ba-throttle-debounce.min.js +2 -0
  991. data/lib/gollum/public/gollum/livepreview/js/livepreview.js +530 -0
  992. data/lib/gollum/public/gollum/livepreview/js/md_sundown.js +22 -0
  993. data/lib/gollum/public/gollum/livepreview/js/requirejs.min.js +35 -0
  994. data/lib/gollum/public/gollum/livepreview/js/sundown.js +1 -0
  995. data/lib/gollum/public/gollum/livepreview/licenses/ace/LICENSE.txt +24 -0
  996. data/lib/gollum/public/gollum/livepreview/licenses/bootstraponline_gollum/LICENSE.txt +9 -0
  997. data/lib/gollum/public/gollum/livepreview/licenses/debounce/LICENSE-MIT.txt +22 -0
  998. data/lib/gollum/public/gollum/livepreview/licenses/gollum/LICENSE.txt +21 -0
  999. data/lib/gollum/public/gollum/livepreview/licenses/jquery/MIT-LICENSE.txt +20 -0
  1000. data/lib/gollum/public/gollum/livepreview/licenses/licenses.txt +69 -0
  1001. data/lib/gollum/public/gollum/livepreview/licenses/notepages/LICENSE.txt +19 -0
  1002. data/lib/gollum/public/gollum/livepreview/licenses/requirejs/LICENSE.txt +58 -0
  1003. data/lib/gollum/public/gollum/livepreview/licenses/retina_display_icon_set/by_sa_3.0_unported_legalcode.txt +359 -0
  1004. data/lib/gollum/public/gollum/livepreview/licenses/sizzle/LICENSE.txt +148 -0
  1005. data/lib/gollum/public/gollum/livepreview/licenses/sundown/sundown.txt +4 -0
  1006. data/lib/gollum/public/gollum/livepreview/licenses/templarian_windowsicons/license.txt +40 -0
  1007. data/lib/gollum/public/gollum/livepreview/readme.md +44 -0
  1008. data/lib/gollum/templates/compare.mustache +69 -0
  1009. data/lib/gollum/templates/create.mustache +14 -0
  1010. data/lib/gollum/templates/edit.mustache +12 -0
  1011. data/lib/gollum/templates/editor.mustache +136 -0
  1012. data/lib/gollum/templates/error.mustache +8 -0
  1013. data/lib/gollum/templates/file_view.mustache +34 -0
  1014. data/lib/gollum/templates/history.mustache +60 -0
  1015. data/lib/gollum/templates/history_authors/gravatar.mustache +5 -0
  1016. data/lib/gollum/templates/history_authors/identicon.mustache +5 -0
  1017. data/lib/gollum/templates/history_authors/none.mustache +3 -0
  1018. data/lib/gollum/templates/latest_changes.mustache +39 -0
  1019. data/lib/gollum/templates/layout.mustache +67 -0
  1020. data/lib/gollum/templates/livepreview.mustache +66 -0
  1021. data/lib/gollum/templates/page.mustache +100 -0
  1022. data/lib/gollum/templates/pages.mustache +42 -0
  1023. data/lib/gollum/templates/search.mustache +38 -0
  1024. data/lib/gollum/templates/searchbar.mustache +10 -0
  1025. data/lib/gollum/uri_encode_component.rb +212 -0
  1026. data/lib/gollum/views/compare.rb +94 -0
  1027. data/lib/gollum/views/create.rb +61 -0
  1028. data/lib/gollum/views/edit.rb +77 -0
  1029. data/lib/gollum/views/editable.rb +13 -0
  1030. data/lib/gollum/views/error.rb +7 -0
  1031. data/lib/gollum/views/file_view.rb +19 -0
  1032. data/lib/gollum/views/has_page.rb +15 -0
  1033. data/lib/gollum/views/history.rb +88 -0
  1034. data/lib/gollum/views/latest_changes.rb +90 -0
  1035. data/lib/gollum/views/layout.rb +45 -0
  1036. data/lib/gollum/views/livepreview.rb +13 -0
  1037. data/lib/gollum/views/page.rb +193 -0
  1038. data/lib/gollum/views/pages.rb +78 -0
  1039. data/lib/gollum/views/search.rb +20 -0
  1040. data/licenses/css_tree_menu_thecssninja/license.txt +50 -0
  1041. data/licenses/licenses.txt +52 -0
  1042. data/licenses/unity_asset_pool/COPYRIGHT +286 -0
  1043. metadata +1284 -0
@@ -0,0 +1,2693 @@
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Distributed under the BSD license:
3
+ *
4
+ * Copyright (c) 2010, Ajax.org B.V.
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ * * Redistributions of source code must retain the above copyright
10
+ * notice, this list of conditions and the following disclaimer.
11
+ * * Redistributions in binary form must reproduce the above copyright
12
+ * notice, this list of conditions and the following disclaimer in the
13
+ * documentation and/or other materials provided with the distribution.
14
+ * * Neither the name of Ajax.org B.V. nor the
15
+ * names of its contributors may be used to endorse or promote products
16
+ * derived from this software without specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *
29
+ * ***** END LICENSE BLOCK ***** */
30
+
31
+ define(function(require, exports, module) {
32
+ "use strict";
33
+
34
+ require("./lib/fixoldbrowsers");
35
+
36
+ var oop = require("./lib/oop");
37
+ var dom = require("./lib/dom");
38
+ var lang = require("./lib/lang");
39
+ var useragent = require("./lib/useragent");
40
+ var TextInput = require("./keyboard/textinput").TextInput;
41
+ var MouseHandler = require("./mouse/mouse_handler").MouseHandler;
42
+ var FoldHandler = require("./mouse/fold_handler").FoldHandler;
43
+ var KeyBinding = require("./keyboard/keybinding").KeyBinding;
44
+ var EditSession = require("./edit_session").EditSession;
45
+ var Search = require("./search").Search;
46
+ var Range = require("./range").Range;
47
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
48
+ var CommandManager = require("./commands/command_manager").CommandManager;
49
+ var defaultCommands = require("./commands/default_commands").commands;
50
+ var config = require("./config");
51
+ var TokenIterator = require("./token_iterator").TokenIterator;
52
+
53
+ /**
54
+ * The main entry point into the Ace functionality.
55
+ *
56
+ * The `Editor` manages the [[EditSession]] (which manages [[Document]]s), as well as the [[VirtualRenderer]], which draws everything to the screen.
57
+ *
58
+ * Event sessions dealing with the mouse and keyboard are bubbled up from `Document` to the `Editor`, which decides what to do with them.
59
+ * @class Editor
60
+ **/
61
+
62
+ /**
63
+ * Creates a new `Editor` object.
64
+ *
65
+ * @param {VirtualRenderer} renderer Associated `VirtualRenderer` that draws everything
66
+ * @param {EditSession} session The `EditSession` to refer to
67
+ *
68
+ *
69
+ * @constructor
70
+ **/
71
+ var Editor = function(renderer, session) {
72
+ var container = renderer.getContainerElement();
73
+ this.container = container;
74
+ this.renderer = renderer;
75
+
76
+ this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
77
+ this.textInput = new TextInput(renderer.getTextAreaContainer(), this);
78
+ this.renderer.textarea = this.textInput.getElement();
79
+ this.keyBinding = new KeyBinding(this);
80
+
81
+ // TODO detect touch event support
82
+ this.$mouseHandler = new MouseHandler(this);
83
+ new FoldHandler(this);
84
+
85
+ this.$blockScrolling = 0;
86
+ this.$search = new Search().set({
87
+ wrap: true
88
+ });
89
+
90
+ this.$historyTracker = this.$historyTracker.bind(this);
91
+ this.commands.on("exec", this.$historyTracker);
92
+
93
+ this.$initOperationListeners();
94
+
95
+ this._$emitInputEvent = lang.delayedCall(function() {
96
+ this._signal("input", {});
97
+ if (this.session && this.session.bgTokenizer)
98
+ this.session.bgTokenizer.scheduleStart();
99
+ }.bind(this));
100
+
101
+ this.on("change", function(_, _self) {
102
+ _self._$emitInputEvent.schedule(31);
103
+ });
104
+
105
+ this.setSession(session || new EditSession(""));
106
+ config.resetOptions(this);
107
+ config._signal("editor", this);
108
+ };
109
+
110
+ (function(){
111
+
112
+ oop.implement(this, EventEmitter);
113
+
114
+ this.$initOperationListeners = function() {
115
+ function last(a) {return a[a.length - 1]}
116
+
117
+ this.selections = [];
118
+ this.commands.on("exec", this.startOperation.bind(this), true);
119
+ this.commands.on("afterExec", this.endOperation.bind(this), true);
120
+
121
+ this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this));
122
+
123
+ this.on("change", function() {
124
+ this.curOp || this.startOperation();
125
+ this.curOp.docChanged = true;
126
+ }.bind(this), true);
127
+
128
+ this.on("changeSelection", function() {
129
+ this.curOp || this.startOperation();
130
+ this.curOp.selectionChanged = true;
131
+ }.bind(this), true);
132
+ };
133
+
134
+ this.curOp = null;
135
+ this.prevOp = {};
136
+ this.startOperation = function(commadEvent) {
137
+ if (this.curOp) {
138
+ if (!commadEvent || this.curOp.command)
139
+ return;
140
+ this.prevOp = this.curOp;
141
+ }
142
+ if (!commadEvent) {
143
+ this.previousCommand = null;
144
+ commadEvent = {};
145
+ }
146
+
147
+ this.$opResetTimer.schedule();
148
+ this.curOp = {
149
+ command: commadEvent.command || {},
150
+ args: commadEvent.args,
151
+ scrollTop: this.renderer.scrollTop
152
+ };
153
+ if (this.curOp.command.name)
154
+ this.$blockScrolling++;
155
+ // this.selections.push(this.selection.toJSON());
156
+ };
157
+
158
+ this.endOperation = function(e) {
159
+ if (this.curOp) {
160
+ if (e && e.returnValue === false)
161
+ return this.curOp = null;
162
+ this._signal("beforeEndOperation");
163
+ var command = this.curOp.command;
164
+ if (command.name && this.$blockScrolling)
165
+ this.$blockScrolling--;
166
+ if (command && command.scrollIntoView) {
167
+ switch (command.scrollIntoView) {
168
+ case "center":
169
+ this.renderer.scrollCursorIntoView(null, 0.5);
170
+ break;
171
+ case "animate":
172
+ case "cursor":
173
+ this.renderer.scrollCursorIntoView();
174
+ break;
175
+ case "selectionPart":
176
+ var range = this.selection.getRange();
177
+ var config = this.renderer.layerConfig;
178
+ if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) {
179
+ this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);
180
+ }
181
+ break;
182
+ default:
183
+ break;
184
+ }
185
+ if (command.scrollIntoView == "animate")
186
+ this.renderer.animateScrolling(this.curOp.scrollTop);
187
+ }
188
+
189
+ this.prevOp = this.curOp;
190
+ this.curOp = null;
191
+ }
192
+ };
193
+
194
+ // TODO use property on commands instead of this
195
+ this.$mergeableCommands = ["backspace", "del", "insertstring"];
196
+ this.$historyTracker = function(e) {
197
+ if (!this.$mergeUndoDeltas)
198
+ return;
199
+
200
+ var prev = this.prevOp;
201
+ var mergeableCommands = this.$mergeableCommands;
202
+ // previous command was the same
203
+ var shouldMerge = prev.command && (e.command.name == prev.command.name);
204
+ if (e.command.name == "insertstring") {
205
+ var text = e.args;
206
+ if (this.mergeNextCommand === undefined)
207
+ this.mergeNextCommand = true;
208
+
209
+ shouldMerge = shouldMerge
210
+ && this.mergeNextCommand // previous command allows to coalesce with
211
+ && (!/\s/.test(text) || /\s/.test(prev.args)); // previous insertion was of same type
212
+
213
+ this.mergeNextCommand = true;
214
+ } else {
215
+ shouldMerge = shouldMerge
216
+ && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable
217
+ }
218
+
219
+ if (
220
+ this.$mergeUndoDeltas != "always"
221
+ && Date.now() - this.sequenceStartTime > 2000
222
+ ) {
223
+ shouldMerge = false; // the sequence is too long
224
+ }
225
+
226
+ if (shouldMerge)
227
+ this.session.mergeUndoDeltas = true;
228
+ else if (mergeableCommands.indexOf(e.command.name) !== -1)
229
+ this.sequenceStartTime = Date.now();
230
+ };
231
+
232
+ /**
233
+ * Sets a new key handler, such as "vim" or "windows".
234
+ * @param {String} keyboardHandler The new key handler
235
+ *
236
+ **/
237
+ this.setKeyboardHandler = function(keyboardHandler, cb) {
238
+ if (keyboardHandler && typeof keyboardHandler === "string") {
239
+ this.$keybindingId = keyboardHandler;
240
+ var _self = this;
241
+ config.loadModule(["keybinding", keyboardHandler], function(module) {
242
+ if (_self.$keybindingId == keyboardHandler)
243
+ _self.keyBinding.setKeyboardHandler(module && module.handler);
244
+ cb && cb();
245
+ });
246
+ } else {
247
+ this.$keybindingId = null;
248
+ this.keyBinding.setKeyboardHandler(keyboardHandler);
249
+ cb && cb();
250
+ }
251
+ };
252
+
253
+ /**
254
+ * Returns the keyboard handler, such as "vim" or "windows".
255
+ *
256
+ * @returns {String}
257
+ *
258
+ **/
259
+ this.getKeyboardHandler = function() {
260
+ return this.keyBinding.getKeyboardHandler();
261
+ };
262
+
263
+
264
+ /**
265
+ * Emitted whenever the [[EditSession]] changes.
266
+ * @event changeSession
267
+ * @param {Object} e An object with two properties, `oldSession` and `session`, that represent the old and new [[EditSession]]s.
268
+ *
269
+ **/
270
+ /**
271
+ * Sets a new editsession to use. This method also emits the `'changeSession'` event.
272
+ * @param {EditSession} session The new session to use
273
+ *
274
+ **/
275
+ this.setSession = function(session) {
276
+ if (this.session == session)
277
+ return;
278
+
279
+ var oldSession = this.session;
280
+ if (oldSession) {
281
+ this.session.removeEventListener("change", this.$onDocumentChange);
282
+ this.session.removeEventListener("changeMode", this.$onChangeMode);
283
+ this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
284
+ this.session.removeEventListener("changeTabSize", this.$onChangeTabSize);
285
+ this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit);
286
+ this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode);
287
+ this.session.removeEventListener("onChangeFold", this.$onChangeFold);
288
+ this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker);
289
+ this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker);
290
+ this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint);
291
+ this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation);
292
+ this.session.removeEventListener("changeOverwrite", this.$onCursorChange);
293
+ this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange);
294
+ this.session.removeEventListener("changeScrollLeft", this.$onScrollLeftChange);
295
+
296
+ var selection = this.session.getSelection();
297
+ selection.removeEventListener("changeCursor", this.$onCursorChange);
298
+ selection.removeEventListener("changeSelection", this.$onSelectionChange);
299
+ }
300
+
301
+ this.session = session;
302
+ if (session) {
303
+ this.$onDocumentChange = this.onDocumentChange.bind(this);
304
+ session.addEventListener("change", this.$onDocumentChange);
305
+ this.renderer.setSession(session);
306
+
307
+ this.$onChangeMode = this.onChangeMode.bind(this);
308
+ session.addEventListener("changeMode", this.$onChangeMode);
309
+
310
+ this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
311
+ session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
312
+
313
+ this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);
314
+ session.addEventListener("changeTabSize", this.$onChangeTabSize);
315
+
316
+ this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
317
+ session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
318
+
319
+ this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
320
+ session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
321
+
322
+ this.$onChangeFold = this.onChangeFold.bind(this);
323
+ session.addEventListener("changeFold", this.$onChangeFold);
324
+
325
+ this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
326
+ this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
327
+
328
+ this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
329
+ this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
330
+
331
+ this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
332
+ this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
333
+
334
+ this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
335
+ this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
336
+
337
+ this.$onCursorChange = this.onCursorChange.bind(this);
338
+ this.session.addEventListener("changeOverwrite", this.$onCursorChange);
339
+
340
+ this.$onScrollTopChange = this.onScrollTopChange.bind(this);
341
+ this.session.addEventListener("changeScrollTop", this.$onScrollTopChange);
342
+
343
+ this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
344
+ this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
345
+
346
+ this.selection = session.getSelection();
347
+ this.selection.addEventListener("changeCursor", this.$onCursorChange);
348
+
349
+ this.$onSelectionChange = this.onSelectionChange.bind(this);
350
+ this.selection.addEventListener("changeSelection", this.$onSelectionChange);
351
+
352
+ this.onChangeMode();
353
+
354
+ this.$blockScrolling += 1;
355
+ this.onCursorChange();
356
+ this.$blockScrolling -= 1;
357
+
358
+ this.onScrollTopChange();
359
+ this.onScrollLeftChange();
360
+ this.onSelectionChange();
361
+ this.onChangeFrontMarker();
362
+ this.onChangeBackMarker();
363
+ this.onChangeBreakpoint();
364
+ this.onChangeAnnotation();
365
+ this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();
366
+ this.renderer.updateFull();
367
+ } else {
368
+ this.selection = null;
369
+ this.renderer.setSession(session);
370
+ }
371
+
372
+ this._signal("changeSession", {
373
+ session: session,
374
+ oldSession: oldSession
375
+ });
376
+
377
+ oldSession && oldSession._signal("changeEditor", {oldEditor: this});
378
+ session && session._signal("changeEditor", {editor: this});
379
+ };
380
+
381
+ /**
382
+ * Returns the current session being used.
383
+ * @returns {EditSession}
384
+ **/
385
+ this.getSession = function() {
386
+ return this.session;
387
+ };
388
+
389
+ /**
390
+ * Sets the current document to `val`.
391
+ * @param {String} val The new value to set for the document
392
+ * @param {Number} cursorPos Where to set the new value. `undefined` or 0 is selectAll, -1 is at the document start, and 1 is at the end
393
+ *
394
+ * @returns {String} The current document value
395
+ * @related Document.setValue
396
+ **/
397
+ this.setValue = function(val, cursorPos) {
398
+ this.session.doc.setValue(val);
399
+
400
+ if (!cursorPos)
401
+ this.selectAll();
402
+ else if (cursorPos == 1)
403
+ this.navigateFileEnd();
404
+ else if (cursorPos == -1)
405
+ this.navigateFileStart();
406
+
407
+ return val;
408
+ };
409
+
410
+ /**
411
+ * Returns the current session's content.
412
+ *
413
+ * @returns {String}
414
+ * @related EditSession.getValue
415
+ **/
416
+ this.getValue = function() {
417
+ return this.session.getValue();
418
+ };
419
+
420
+ /**
421
+ *
422
+ * Returns the currently highlighted selection.
423
+ * @returns {String} The highlighted selection
424
+ **/
425
+ this.getSelection = function() {
426
+ return this.selection;
427
+ };
428
+
429
+ /**
430
+ * {:VirtualRenderer.onResize}
431
+ * @param {Boolean} force If `true`, recomputes the size, even if the height and width haven't changed
432
+ *
433
+ *
434
+ * @related VirtualRenderer.onResize
435
+ **/
436
+ this.resize = function(force) {
437
+ this.renderer.onResize(force);
438
+ };
439
+
440
+ /**
441
+ * {:VirtualRenderer.setTheme}
442
+ * @param {String} theme The path to a theme
443
+ * @param {Function} cb optional callback called when theme is loaded
444
+ **/
445
+ this.setTheme = function(theme, cb) {
446
+ this.renderer.setTheme(theme, cb);
447
+ };
448
+
449
+ /**
450
+ * {:VirtualRenderer.getTheme}
451
+ *
452
+ * @returns {String} The set theme
453
+ * @related VirtualRenderer.getTheme
454
+ **/
455
+ this.getTheme = function() {
456
+ return this.renderer.getTheme();
457
+ };
458
+
459
+ /**
460
+ * {:VirtualRenderer.setStyle}
461
+ * @param {String} style A class name
462
+ *
463
+ *
464
+ * @related VirtualRenderer.setStyle
465
+ **/
466
+ this.setStyle = function(style) {
467
+ this.renderer.setStyle(style);
468
+ };
469
+
470
+ /**
471
+ * {:VirtualRenderer.unsetStyle}
472
+ * @related VirtualRenderer.unsetStyle
473
+ **/
474
+ this.unsetStyle = function(style) {
475
+ this.renderer.unsetStyle(style);
476
+ };
477
+
478
+ /**
479
+ * Gets the current font size of the editor text.
480
+ */
481
+ this.getFontSize = function () {
482
+ return this.getOption("fontSize") ||
483
+ dom.computedStyle(this.container, "fontSize");
484
+ };
485
+
486
+ /**
487
+ * Set a new font size (in pixels) for the editor text.
488
+ * @param {String} size A font size ( _e.g._ "12px")
489
+ *
490
+ *
491
+ **/
492
+ this.setFontSize = function(size) {
493
+ this.setOption("fontSize", size);
494
+ };
495
+
496
+ this.$highlightBrackets = function() {
497
+ if (this.session.$bracketHighlight) {
498
+ this.session.removeMarker(this.session.$bracketHighlight);
499
+ this.session.$bracketHighlight = null;
500
+ }
501
+
502
+ if (this.$highlightPending) {
503
+ return;
504
+ }
505
+
506
+ // perform highlight async to not block the browser during navigation
507
+ var self = this;
508
+ this.$highlightPending = true;
509
+ setTimeout(function() {
510
+ self.$highlightPending = false;
511
+ var session = self.session;
512
+ if (!session || !session.bgTokenizer) return;
513
+ var pos = session.findMatchingBracket(self.getCursorPosition());
514
+ if (pos) {
515
+ var range = new Range(pos.row, pos.column, pos.row, pos.column + 1);
516
+ } else if (session.$mode.getMatching) {
517
+ var range = session.$mode.getMatching(self.session);
518
+ }
519
+ if (range)
520
+ session.$bracketHighlight = session.addMarker(range, "ace_bracket", "text");
521
+ }, 50);
522
+ };
523
+
524
+ // todo: move to mode.getMatching
525
+ this.$highlightTags = function() {
526
+ if (this.$highlightTagPending)
527
+ return;
528
+
529
+ // perform highlight async to not block the browser during navigation
530
+ var self = this;
531
+ this.$highlightTagPending = true;
532
+ setTimeout(function() {
533
+ self.$highlightTagPending = false;
534
+
535
+ var session = self.session;
536
+ if (!session || !session.bgTokenizer) return;
537
+
538
+ var pos = self.getCursorPosition();
539
+ var iterator = new TokenIterator(self.session, pos.row, pos.column);
540
+ var token = iterator.getCurrentToken();
541
+
542
+ if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) {
543
+ session.removeMarker(session.$tagHighlight);
544
+ session.$tagHighlight = null;
545
+ return;
546
+ }
547
+
548
+ if (token.type.indexOf("tag-open") != -1) {
549
+ token = iterator.stepForward();
550
+ if (!token)
551
+ return;
552
+ }
553
+
554
+ var tag = token.value;
555
+ var depth = 0;
556
+ var prevToken = iterator.stepBackward();
557
+
558
+ if (prevToken.value == '<'){
559
+ //find closing tag
560
+ do {
561
+ prevToken = token;
562
+ token = iterator.stepForward();
563
+
564
+ if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {
565
+ if (prevToken.value === '<'){
566
+ depth++;
567
+ } else if (prevToken.value === '</'){
568
+ depth--;
569
+ }
570
+ }
571
+
572
+ } while (token && depth >= 0);
573
+ } else {
574
+ //find opening tag
575
+ do {
576
+ token = prevToken;
577
+ prevToken = iterator.stepBackward();
578
+
579
+ if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {
580
+ if (prevToken.value === '<') {
581
+ depth++;
582
+ } else if (prevToken.value === '</') {
583
+ depth--;
584
+ }
585
+ }
586
+ } while (prevToken && depth <= 0);
587
+
588
+ //select tag again
589
+ iterator.stepForward();
590
+ }
591
+
592
+ if (!token) {
593
+ session.removeMarker(session.$tagHighlight);
594
+ session.$tagHighlight = null;
595
+ return;
596
+ }
597
+
598
+ var row = iterator.getCurrentTokenRow();
599
+ var column = iterator.getCurrentTokenColumn();
600
+ var range = new Range(row, column, row, column+token.value.length);
601
+
602
+ //remove range if different
603
+ if (session.$tagHighlight && range.compareRange(session.$backMarkers[session.$tagHighlight].range)!==0) {
604
+ session.removeMarker(session.$tagHighlight);
605
+ session.$tagHighlight = null;
606
+ }
607
+
608
+ if (range && !session.$tagHighlight)
609
+ session.$tagHighlight = session.addMarker(range, "ace_bracket", "text");
610
+ }, 50);
611
+ };
612
+
613
+ /**
614
+ *
615
+ * Brings the current `textInput` into focus.
616
+ **/
617
+ this.focus = function() {
618
+ // Safari needs the timeout
619
+ // iOS and Firefox need it called immediately
620
+ // to be on the save side we do both
621
+ var _self = this;
622
+ setTimeout(function() {
623
+ _self.textInput.focus();
624
+ });
625
+ this.textInput.focus();
626
+ };
627
+
628
+ /**
629
+ * Returns `true` if the current `textInput` is in focus.
630
+ * @return {Boolean}
631
+ **/
632
+ this.isFocused = function() {
633
+ return this.textInput.isFocused();
634
+ };
635
+
636
+ /**
637
+ *
638
+ * Blurs the current `textInput`.
639
+ **/
640
+ this.blur = function() {
641
+ this.textInput.blur();
642
+ };
643
+
644
+ /**
645
+ * Emitted once the editor comes into focus.
646
+ * @event focus
647
+ *
648
+ *
649
+ **/
650
+ this.onFocus = function(e) {
651
+ if (this.$isFocused)
652
+ return;
653
+ this.$isFocused = true;
654
+ this.renderer.showCursor();
655
+ this.renderer.visualizeFocus();
656
+ this._emit("focus", e);
657
+ };
658
+
659
+ /**
660
+ * Emitted once the editor has been blurred.
661
+ * @event blur
662
+ *
663
+ *
664
+ **/
665
+ this.onBlur = function(e) {
666
+ if (!this.$isFocused)
667
+ return;
668
+ this.$isFocused = false;
669
+ this.renderer.hideCursor();
670
+ this.renderer.visualizeBlur();
671
+ this._emit("blur", e);
672
+ };
673
+
674
+ this.$cursorChange = function() {
675
+ this.renderer.updateCursor();
676
+ };
677
+
678
+ /**
679
+ * Emitted whenever the document is changed.
680
+ * @event change
681
+ * @param {Object} e Contains a single property, `data`, which has the delta of changes
682
+ *
683
+ *
684
+ *
685
+ **/
686
+ this.onDocumentChange = function(e) {
687
+ var delta = e.data;
688
+ var range = delta.range;
689
+ var lastRow;
690
+
691
+ if (range.start.row == range.end.row && delta.action != "insertLines" && delta.action != "removeLines")
692
+ lastRow = range.end.row;
693
+ else
694
+ lastRow = Infinity;
695
+ this.renderer.updateLines(range.start.row, lastRow, this.session.$useWrapMode);
696
+
697
+ this._signal("change", e);
698
+
699
+ // update cursor because tab characters can influence the cursor position
700
+ this.$cursorChange();
701
+ this.$updateHighlightActiveLine();
702
+ };
703
+
704
+ this.onTokenizerUpdate = function(e) {
705
+ var rows = e.data;
706
+ this.renderer.updateLines(rows.first, rows.last);
707
+ };
708
+
709
+
710
+ this.onScrollTopChange = function() {
711
+ this.renderer.scrollToY(this.session.getScrollTop());
712
+ };
713
+
714
+ this.onScrollLeftChange = function() {
715
+ this.renderer.scrollToX(this.session.getScrollLeft());
716
+ };
717
+
718
+ /**
719
+ * Emitted when the selection changes.
720
+ *
721
+ **/
722
+ this.onCursorChange = function() {
723
+ this.$cursorChange();
724
+
725
+ if (!this.$blockScrolling) {
726
+ config.warn("Automatically scrolling cursor into view after selection change",
727
+ "this will be disabled in the next version",
728
+ "set editor.$blockScrolling = Infinity to disable this message"
729
+ );
730
+ this.renderer.scrollCursorIntoView();
731
+ }
732
+
733
+ this.$highlightBrackets();
734
+ this.$highlightTags();
735
+ this.$updateHighlightActiveLine();
736
+ this._signal("changeSelection");
737
+ };
738
+
739
+ this.$updateHighlightActiveLine = function() {
740
+ var session = this.getSession();
741
+
742
+ var highlight;
743
+ if (this.$highlightActiveLine) {
744
+ if ((this.$selectionStyle != "line" || !this.selection.isMultiLine()))
745
+ highlight = this.getCursorPosition();
746
+ if (this.renderer.$maxLines && this.session.getLength() === 1 && !(this.renderer.$minLines > 1))
747
+ highlight = false;
748
+ }
749
+
750
+ if (session.$highlightLineMarker && !highlight) {
751
+ session.removeMarker(session.$highlightLineMarker.id);
752
+ session.$highlightLineMarker = null;
753
+ } else if (!session.$highlightLineMarker && highlight) {
754
+ var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);
755
+ range.id = session.addMarker(range, "ace_active-line", "screenLine");
756
+ session.$highlightLineMarker = range;
757
+ } else if (highlight) {
758
+ session.$highlightLineMarker.start.row = highlight.row;
759
+ session.$highlightLineMarker.end.row = highlight.row;
760
+ session.$highlightLineMarker.start.column = highlight.column;
761
+ session._signal("changeBackMarker");
762
+ }
763
+ };
764
+
765
+ this.onSelectionChange = function(e) {
766
+ var session = this.session;
767
+
768
+ if (session.$selectionMarker) {
769
+ session.removeMarker(session.$selectionMarker);
770
+ }
771
+ session.$selectionMarker = null;
772
+
773
+ if (!this.selection.isEmpty()) {
774
+ var range = this.selection.getRange();
775
+ var style = this.getSelectionStyle();
776
+ session.$selectionMarker = session.addMarker(range, "ace_selection", style);
777
+ } else {
778
+ this.$updateHighlightActiveLine();
779
+ }
780
+
781
+ var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();
782
+ this.session.highlight(re);
783
+
784
+ this._signal("changeSelection");
785
+ };
786
+
787
+ this.$getSelectionHighLightRegexp = function() {
788
+ var session = this.session;
789
+
790
+ var selection = this.getSelectionRange();
791
+ if (selection.isEmpty() || selection.isMultiLine())
792
+ return;
793
+
794
+ var startOuter = selection.start.column - 1;
795
+ var endOuter = selection.end.column + 1;
796
+ var line = session.getLine(selection.start.row);
797
+ var lineCols = line.length;
798
+ var needle = line.substring(Math.max(startOuter, 0),
799
+ Math.min(endOuter, lineCols));
800
+
801
+ // Make sure the outer characters are not part of the word.
802
+ if ((startOuter >= 0 && /^[\w\d]/.test(needle)) ||
803
+ (endOuter <= lineCols && /[\w\d]$/.test(needle)))
804
+ return;
805
+
806
+ needle = line.substring(selection.start.column, selection.end.column);
807
+ if (!/^[\w\d]+$/.test(needle))
808
+ return;
809
+
810
+ var re = this.$search.$assembleRegExp({
811
+ wholeWord: true,
812
+ caseSensitive: true,
813
+ needle: needle
814
+ });
815
+
816
+ return re;
817
+ };
818
+
819
+
820
+ this.onChangeFrontMarker = function() {
821
+ this.renderer.updateFrontMarkers();
822
+ };
823
+
824
+ this.onChangeBackMarker = function() {
825
+ this.renderer.updateBackMarkers();
826
+ };
827
+
828
+
829
+ this.onChangeBreakpoint = function() {
830
+ this.renderer.updateBreakpoints();
831
+ };
832
+
833
+ this.onChangeAnnotation = function() {
834
+ this.renderer.setAnnotations(this.session.getAnnotations());
835
+ };
836
+
837
+
838
+ this.onChangeMode = function(e) {
839
+ this.renderer.updateText();
840
+ this._emit("changeMode", e);
841
+ };
842
+
843
+
844
+ this.onChangeWrapLimit = function() {
845
+ this.renderer.updateFull();
846
+ };
847
+
848
+ this.onChangeWrapMode = function() {
849
+ this.renderer.onResize(true);
850
+ };
851
+
852
+
853
+ this.onChangeFold = function() {
854
+ // Update the active line marker as due to folding changes the current
855
+ // line range on the screen might have changed.
856
+ this.$updateHighlightActiveLine();
857
+ // TODO: This might be too much updating. Okay for now.
858
+ this.renderer.updateFull();
859
+ };
860
+
861
+
862
+ /**
863
+ * Returns the string of text currently highlighted.
864
+ * @returns {String}
865
+ **/
866
+ this.getSelectedText = function() {
867
+ return this.session.getTextRange(this.getSelectionRange());
868
+ };
869
+
870
+ /**
871
+ * Emitted when text is copied.
872
+ * @event copy
873
+ * @param {String} text The copied text
874
+ *
875
+ **/
876
+ /**
877
+ * Returns the string of text currently highlighted.
878
+ * @returns {String}
879
+ * @deprecated Use getSelectedText instead.
880
+ **/
881
+ this.getCopyText = function() {
882
+ var text = this.getSelectedText();
883
+ this._signal("copy", text);
884
+ return text;
885
+ };
886
+
887
+ /**
888
+ * Called whenever a text "copy" happens.
889
+ **/
890
+ this.onCopy = function() {
891
+ this.commands.exec("copy", this);
892
+ };
893
+
894
+ /**
895
+ * Called whenever a text "cut" happens.
896
+ **/
897
+ this.onCut = function() {
898
+ this.commands.exec("cut", this);
899
+ };
900
+
901
+ /**
902
+ * Emitted when text is pasted.
903
+ * @event paste
904
+ * @param {Object} an object which contains one property, `text`, that represents the text to be pasted. Editing this property will alter the text that is pasted.
905
+ *
906
+ *
907
+ **/
908
+ /**
909
+ * Called whenever a text "paste" happens.
910
+ * @param {String} text The pasted text
911
+ *
912
+ *
913
+ **/
914
+ this.onPaste = function(text) {
915
+ // todo this should change when paste becomes a command
916
+ if (this.$readOnly)
917
+ return;
918
+
919
+ var e = {text: text};
920
+ this._signal("paste", e);
921
+ text = e.text;
922
+ if (!this.inMultiSelectMode || this.inVirtualSelectionMode) {
923
+ this.insert(text);
924
+ } else {
925
+ var lines = text.split(/\r\n|\r|\n/);
926
+ var ranges = this.selection.rangeList.ranges;
927
+
928
+ if (lines.length > ranges.length || lines.length < 2 || !lines[1])
929
+ return this.commands.exec("insertstring", this, text);
930
+
931
+ for (var i = ranges.length; i--;) {
932
+ var range = ranges[i];
933
+ if (!range.isEmpty())
934
+ this.session.remove(range);
935
+
936
+ this.session.insert(range.start, lines[i]);
937
+ }
938
+ }
939
+ this.renderer.scrollCursorIntoView();
940
+ };
941
+
942
+ this.execCommand = function(command, args) {
943
+ return this.commands.exec(command, this, args);
944
+ };
945
+
946
+ /**
947
+ * Inserts `text` into wherever the cursor is pointing.
948
+ * @param {String} text The new text to add
949
+ *
950
+ **/
951
+ this.insert = function(text, pasted) {
952
+ var session = this.session;
953
+ var mode = session.getMode();
954
+ var cursor = this.getCursorPosition();
955
+
956
+ if (this.getBehavioursEnabled() && !pasted) {
957
+ // Get a transform if the current mode wants one.
958
+ var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);
959
+ if (transform) {
960
+ if (text !== transform.text) {
961
+ this.session.mergeUndoDeltas = false;
962
+ this.$mergeNextCommand = false;
963
+ }
964
+ text = transform.text;
965
+
966
+ }
967
+ }
968
+
969
+ if (text == "\t")
970
+ text = this.session.getTabString();
971
+
972
+ // remove selected text
973
+ if (!this.selection.isEmpty()) {
974
+ var range = this.getSelectionRange();
975
+ cursor = this.session.remove(range);
976
+ this.clearSelection();
977
+ }
978
+ else if (this.session.getOverwrite()) {
979
+ var range = new Range.fromPoints(cursor, cursor);
980
+ range.end.column += text.length;
981
+ this.session.remove(range);
982
+ }
983
+
984
+ if (text == "\n" || text == "\r\n") {
985
+ var line = session.getLine(cursor.row);
986
+ if (cursor.column > line.search(/\S|$/)) {
987
+ var d = line.substr(cursor.column).search(/\S|$/);
988
+ session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);
989
+ }
990
+ }
991
+ this.clearSelection();
992
+
993
+ var start = cursor.column;
994
+ var lineState = session.getState(cursor.row);
995
+ var line = session.getLine(cursor.row);
996
+ var shouldOutdent = mode.checkOutdent(lineState, line, text);
997
+ var end = session.insert(cursor, text);
998
+
999
+ if (transform && transform.selection) {
1000
+ if (transform.selection.length == 2) { // Transform relative to the current column
1001
+ this.selection.setSelectionRange(
1002
+ new Range(cursor.row, start + transform.selection[0],
1003
+ cursor.row, start + transform.selection[1]));
1004
+ } else { // Transform relative to the current row.
1005
+ this.selection.setSelectionRange(
1006
+ new Range(cursor.row + transform.selection[0],
1007
+ transform.selection[1],
1008
+ cursor.row + transform.selection[2],
1009
+ transform.selection[3]));
1010
+ }
1011
+ }
1012
+
1013
+ if (session.getDocument().isNewLine(text)) {
1014
+ var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());
1015
+
1016
+ session.insert({row: cursor.row+1, column: 0}, lineIndent);
1017
+ }
1018
+ if (shouldOutdent)
1019
+ mode.autoOutdent(lineState, session, cursor.row);
1020
+ };
1021
+
1022
+ this.onTextInput = function(text) {
1023
+ this.keyBinding.onTextInput(text);
1024
+ };
1025
+
1026
+ this.onCommandKey = function(e, hashId, keyCode) {
1027
+ this.keyBinding.onCommandKey(e, hashId, keyCode);
1028
+ };
1029
+
1030
+ /**
1031
+ * Pass in `true` to enable overwrites in your session, or `false` to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of `overwrite` changes, this function also emites the `changeOverwrite` event.
1032
+ * @param {Boolean} overwrite Defines wheter or not to set overwrites
1033
+ *
1034
+ *
1035
+ * @related EditSession.setOverwrite
1036
+ **/
1037
+ this.setOverwrite = function(overwrite) {
1038
+ this.session.setOverwrite(overwrite);
1039
+ };
1040
+
1041
+ /**
1042
+ * Returns `true` if overwrites are enabled; `false` otherwise.
1043
+ * @returns {Boolean}
1044
+ * @related EditSession.getOverwrite
1045
+ **/
1046
+ this.getOverwrite = function() {
1047
+ return this.session.getOverwrite();
1048
+ };
1049
+
1050
+ /**
1051
+ * Sets the value of overwrite to the opposite of whatever it currently is.
1052
+ * @related EditSession.toggleOverwrite
1053
+ **/
1054
+ this.toggleOverwrite = function() {
1055
+ this.session.toggleOverwrite();
1056
+ };
1057
+
1058
+ /**
1059
+ * Sets how fast the mouse scrolling should do.
1060
+ * @param {Number} speed A value indicating the new speed (in milliseconds)
1061
+ **/
1062
+ this.setScrollSpeed = function(speed) {
1063
+ this.setOption("scrollSpeed", speed);
1064
+ };
1065
+
1066
+ /**
1067
+ * Returns the value indicating how fast the mouse scroll speed is (in milliseconds).
1068
+ * @returns {Number}
1069
+ **/
1070
+ this.getScrollSpeed = function() {
1071
+ return this.getOption("scrollSpeed");
1072
+ };
1073
+
1074
+ /**
1075
+ * Sets the delay (in milliseconds) of the mouse drag.
1076
+ * @param {Number} dragDelay A value indicating the new delay
1077
+ **/
1078
+ this.setDragDelay = function(dragDelay) {
1079
+ this.setOption("dragDelay", dragDelay);
1080
+ };
1081
+
1082
+ /**
1083
+ * Returns the current mouse drag delay.
1084
+ * @returns {Number}
1085
+ **/
1086
+ this.getDragDelay = function() {
1087
+ return this.getOption("dragDelay");
1088
+ };
1089
+
1090
+ /**
1091
+ * Emitted when the selection style changes, via [[Editor.setSelectionStyle]].
1092
+ * @event changeSelectionStyle
1093
+ * @param {Object} data Contains one property, `data`, which indicates the new selection style
1094
+ **/
1095
+ /**
1096
+ * Draw selection markers spanning whole line, or only over selected text. Default value is "line"
1097
+ * @param {String} style The new selection style "line"|"text"
1098
+ *
1099
+ **/
1100
+ this.setSelectionStyle = function(val) {
1101
+ this.setOption("selectionStyle", val);
1102
+ };
1103
+
1104
+ /**
1105
+ * Returns the current selection style.
1106
+ * @returns {String}
1107
+ **/
1108
+ this.getSelectionStyle = function() {
1109
+ return this.getOption("selectionStyle");
1110
+ };
1111
+
1112
+ /**
1113
+ * Determines whether or not the current line should be highlighted.
1114
+ * @param {Boolean} shouldHighlight Set to `true` to highlight the current line
1115
+ **/
1116
+ this.setHighlightActiveLine = function(shouldHighlight) {
1117
+ this.setOption("highlightActiveLine", shouldHighlight);
1118
+ };
1119
+ /**
1120
+ * Returns `true` if current lines are always highlighted.
1121
+ * @return {Boolean}
1122
+ **/
1123
+ this.getHighlightActiveLine = function() {
1124
+ return this.getOption("highlightActiveLine");
1125
+ };
1126
+ this.setHighlightGutterLine = function(shouldHighlight) {
1127
+ this.setOption("highlightGutterLine", shouldHighlight);
1128
+ };
1129
+
1130
+ this.getHighlightGutterLine = function() {
1131
+ return this.getOption("highlightGutterLine");
1132
+ };
1133
+
1134
+ /**
1135
+ * Determines if the currently selected word should be highlighted.
1136
+ * @param {Boolean} shouldHighlight Set to `true` to highlight the currently selected word
1137
+ *
1138
+ **/
1139
+ this.setHighlightSelectedWord = function(shouldHighlight) {
1140
+ this.setOption("highlightSelectedWord", shouldHighlight);
1141
+ };
1142
+
1143
+ /**
1144
+ * Returns `true` if currently highlighted words are to be highlighted.
1145
+ * @returns {Boolean}
1146
+ **/
1147
+ this.getHighlightSelectedWord = function() {
1148
+ return this.$highlightSelectedWord;
1149
+ };
1150
+
1151
+ this.setAnimatedScroll = function(shouldAnimate){
1152
+ this.renderer.setAnimatedScroll(shouldAnimate);
1153
+ };
1154
+
1155
+ this.getAnimatedScroll = function(){
1156
+ return this.renderer.getAnimatedScroll();
1157
+ };
1158
+
1159
+ /**
1160
+ * If `showInvisibles` is set to `true`, invisible characters&mdash;like spaces or new lines&mdash;are show in the editor.
1161
+ * @param {Boolean} showInvisibles Specifies whether or not to show invisible characters
1162
+ *
1163
+ **/
1164
+ this.setShowInvisibles = function(showInvisibles) {
1165
+ this.renderer.setShowInvisibles(showInvisibles);
1166
+ };
1167
+
1168
+ /**
1169
+ * Returns `true` if invisible characters are being shown.
1170
+ * @returns {Boolean}
1171
+ **/
1172
+ this.getShowInvisibles = function() {
1173
+ return this.renderer.getShowInvisibles();
1174
+ };
1175
+
1176
+ this.setDisplayIndentGuides = function(display) {
1177
+ this.renderer.setDisplayIndentGuides(display);
1178
+ };
1179
+
1180
+ this.getDisplayIndentGuides = function() {
1181
+ return this.renderer.getDisplayIndentGuides();
1182
+ };
1183
+
1184
+ /**
1185
+ * If `showPrintMargin` is set to `true`, the print margin is shown in the editor.
1186
+ * @param {Boolean} showPrintMargin Specifies whether or not to show the print margin
1187
+ *
1188
+ **/
1189
+ this.setShowPrintMargin = function(showPrintMargin) {
1190
+ this.renderer.setShowPrintMargin(showPrintMargin);
1191
+ };
1192
+
1193
+ /**
1194
+ * Returns `true` if the print margin is being shown.
1195
+ * @returns {Boolean}
1196
+ **/
1197
+ this.getShowPrintMargin = function() {
1198
+ return this.renderer.getShowPrintMargin();
1199
+ };
1200
+
1201
+ /**
1202
+ * Sets the column defining where the print margin should be.
1203
+ * @param {Number} showPrintMargin Specifies the new print margin
1204
+ *
1205
+ **/
1206
+ this.setPrintMarginColumn = function(showPrintMargin) {
1207
+ this.renderer.setPrintMarginColumn(showPrintMargin);
1208
+ };
1209
+
1210
+ /**
1211
+ * Returns the column number of where the print margin is.
1212
+ * @returns {Number}
1213
+ **/
1214
+ this.getPrintMarginColumn = function() {
1215
+ return this.renderer.getPrintMarginColumn();
1216
+ };
1217
+
1218
+ /**
1219
+ * If `readOnly` is true, then the editor is set to read-only mode, and none of the content can change.
1220
+ * @param {Boolean} readOnly Specifies whether the editor can be modified or not
1221
+ *
1222
+ **/
1223
+ this.setReadOnly = function(readOnly) {
1224
+ this.setOption("readOnly", readOnly);
1225
+ };
1226
+
1227
+ /**
1228
+ * Returns `true` if the editor is set to read-only mode.
1229
+ * @returns {Boolean}
1230
+ **/
1231
+ this.getReadOnly = function() {
1232
+ return this.getOption("readOnly");
1233
+ };
1234
+
1235
+ /**
1236
+ * Specifies whether to use behaviors or not. ["Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.]{: #BehaviorsDef}
1237
+ * @param {Boolean} enabled Enables or disables behaviors
1238
+ *
1239
+ **/
1240
+ this.setBehavioursEnabled = function (enabled) {
1241
+ this.setOption("behavioursEnabled", enabled);
1242
+ };
1243
+
1244
+ /**
1245
+ * Returns `true` if the behaviors are currently enabled. {:BehaviorsDef}
1246
+ *
1247
+ * @returns {Boolean}
1248
+ **/
1249
+ this.getBehavioursEnabled = function () {
1250
+ return this.getOption("behavioursEnabled");
1251
+ };
1252
+
1253
+ /**
1254
+ * Specifies whether to use wrapping behaviors or not, i.e. automatically wrapping the selection with characters such as brackets
1255
+ * when such a character is typed in.
1256
+ * @param {Boolean} enabled Enables or disables wrapping behaviors
1257
+ *
1258
+ **/
1259
+ this.setWrapBehavioursEnabled = function (enabled) {
1260
+ this.setOption("wrapBehavioursEnabled", enabled);
1261
+ };
1262
+
1263
+ /**
1264
+ * Returns `true` if the wrapping behaviors are currently enabled.
1265
+ **/
1266
+ this.getWrapBehavioursEnabled = function () {
1267
+ return this.getOption("wrapBehavioursEnabled");
1268
+ };
1269
+
1270
+ /**
1271
+ * Indicates whether the fold widgets should be shown or not.
1272
+ * @param {Boolean} show Specifies whether the fold widgets are shown
1273
+ **/
1274
+ this.setShowFoldWidgets = function(show) {
1275
+ this.setOption("showFoldWidgets", show);
1276
+
1277
+ };
1278
+ /**
1279
+ * Returns `true` if the fold widgets are shown.
1280
+ * @return {Boolean}
1281
+ **/
1282
+ this.getShowFoldWidgets = function() {
1283
+ return this.getOption("showFoldWidgets");
1284
+ };
1285
+
1286
+ this.setFadeFoldWidgets = function(fade) {
1287
+ this.setOption("fadeFoldWidgets", fade);
1288
+ };
1289
+
1290
+ this.getFadeFoldWidgets = function() {
1291
+ return this.getOption("fadeFoldWidgets");
1292
+ };
1293
+
1294
+ /**
1295
+ * Removes the current selection or one character.
1296
+ * @param {String} dir The direction of the deletion to occur, either "left" or "right"
1297
+ *
1298
+ **/
1299
+ this.remove = function(dir) {
1300
+ if (this.selection.isEmpty()){
1301
+ if (dir == "left")
1302
+ this.selection.selectLeft();
1303
+ else
1304
+ this.selection.selectRight();
1305
+ }
1306
+
1307
+ var range = this.getSelectionRange();
1308
+ if (this.getBehavioursEnabled()) {
1309
+ var session = this.session;
1310
+ var state = session.getState(range.start.row);
1311
+ var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);
1312
+
1313
+ if (range.end.column === 0) {
1314
+ var text = session.getTextRange(range);
1315
+ if (text[text.length - 1] == "\n") {
1316
+ var line = session.getLine(range.end.row);
1317
+ if (/^\s+$/.test(line)) {
1318
+ range.end.column = line.length;
1319
+ }
1320
+ }
1321
+ }
1322
+ if (new_range)
1323
+ range = new_range;
1324
+ }
1325
+
1326
+ this.session.remove(range);
1327
+ this.clearSelection();
1328
+ };
1329
+
1330
+ /**
1331
+ * Removes the word directly to the right of the current selection.
1332
+ **/
1333
+ this.removeWordRight = function() {
1334
+ if (this.selection.isEmpty())
1335
+ this.selection.selectWordRight();
1336
+
1337
+ this.session.remove(this.getSelectionRange());
1338
+ this.clearSelection();
1339
+ };
1340
+
1341
+ /**
1342
+ * Removes the word directly to the left of the current selection.
1343
+ **/
1344
+ this.removeWordLeft = function() {
1345
+ if (this.selection.isEmpty())
1346
+ this.selection.selectWordLeft();
1347
+
1348
+ this.session.remove(this.getSelectionRange());
1349
+ this.clearSelection();
1350
+ };
1351
+
1352
+ /**
1353
+ * Removes all the words to the left of the current selection, until the start of the line.
1354
+ **/
1355
+ this.removeToLineStart = function() {
1356
+ if (this.selection.isEmpty())
1357
+ this.selection.selectLineStart();
1358
+
1359
+ this.session.remove(this.getSelectionRange());
1360
+ this.clearSelection();
1361
+ };
1362
+
1363
+ /**
1364
+ * Removes all the words to the right of the current selection, until the end of the line.
1365
+ **/
1366
+ this.removeToLineEnd = function() {
1367
+ if (this.selection.isEmpty())
1368
+ this.selection.selectLineEnd();
1369
+
1370
+ var range = this.getSelectionRange();
1371
+ if (range.start.column == range.end.column && range.start.row == range.end.row) {
1372
+ range.end.column = 0;
1373
+ range.end.row++;
1374
+ }
1375
+
1376
+ this.session.remove(range);
1377
+ this.clearSelection();
1378
+ };
1379
+
1380
+ /**
1381
+ * Splits the line at the current selection (by inserting an `'\n'`).
1382
+ **/
1383
+ this.splitLine = function() {
1384
+ if (!this.selection.isEmpty()) {
1385
+ this.session.remove(this.getSelectionRange());
1386
+ this.clearSelection();
1387
+ }
1388
+
1389
+ var cursor = this.getCursorPosition();
1390
+ this.insert("\n");
1391
+ this.moveCursorToPosition(cursor);
1392
+ };
1393
+
1394
+ /**
1395
+ * Transposes current line.
1396
+ **/
1397
+ this.transposeLetters = function() {
1398
+ if (!this.selection.isEmpty()) {
1399
+ return;
1400
+ }
1401
+
1402
+ var cursor = this.getCursorPosition();
1403
+ var column = cursor.column;
1404
+ if (column === 0)
1405
+ return;
1406
+
1407
+ var line = this.session.getLine(cursor.row);
1408
+ var swap, range;
1409
+ if (column < line.length) {
1410
+ swap = line.charAt(column) + line.charAt(column-1);
1411
+ range = new Range(cursor.row, column-1, cursor.row, column+1);
1412
+ }
1413
+ else {
1414
+ swap = line.charAt(column-1) + line.charAt(column-2);
1415
+ range = new Range(cursor.row, column-2, cursor.row, column);
1416
+ }
1417
+ this.session.replace(range, swap);
1418
+ };
1419
+
1420
+ /**
1421
+ * Converts the current selection entirely into lowercase.
1422
+ **/
1423
+ this.toLowerCase = function() {
1424
+ var originalRange = this.getSelectionRange();
1425
+ if (this.selection.isEmpty()) {
1426
+ this.selection.selectWord();
1427
+ }
1428
+
1429
+ var range = this.getSelectionRange();
1430
+ var text = this.session.getTextRange(range);
1431
+ this.session.replace(range, text.toLowerCase());
1432
+ this.selection.setSelectionRange(originalRange);
1433
+ };
1434
+
1435
+ /**
1436
+ * Converts the current selection entirely into uppercase.
1437
+ **/
1438
+ this.toUpperCase = function() {
1439
+ var originalRange = this.getSelectionRange();
1440
+ if (this.selection.isEmpty()) {
1441
+ this.selection.selectWord();
1442
+ }
1443
+
1444
+ var range = this.getSelectionRange();
1445
+ var text = this.session.getTextRange(range);
1446
+ this.session.replace(range, text.toUpperCase());
1447
+ this.selection.setSelectionRange(originalRange);
1448
+ };
1449
+
1450
+ /**
1451
+ * Inserts an indentation into the current cursor position or indents the selected lines.
1452
+ *
1453
+ * @related EditSession.indentRows
1454
+ **/
1455
+ this.indent = function() {
1456
+ var session = this.session;
1457
+ var range = this.getSelectionRange();
1458
+
1459
+ if (range.start.row < range.end.row) {
1460
+ var rows = this.$getSelectedRows();
1461
+ session.indentRows(rows.first, rows.last, "\t");
1462
+ return;
1463
+ } else if (range.start.column < range.end.column) {
1464
+ var text = session.getTextRange(range);
1465
+ if (!/^\s+$/.test(text)) {
1466
+ var rows = this.$getSelectedRows();
1467
+ session.indentRows(rows.first, rows.last, "\t");
1468
+ return;
1469
+ }
1470
+ }
1471
+
1472
+ var line = session.getLine(range.start.row);
1473
+ var position = range.start;
1474
+ var size = session.getTabSize();
1475
+ var column = session.documentToScreenColumn(position.row, position.column);
1476
+
1477
+ if (this.session.getUseSoftTabs()) {
1478
+ var count = (size - column % size);
1479
+ var indentString = lang.stringRepeat(" ", count);
1480
+ } else {
1481
+ var count = column % size;
1482
+ while (line[range.start.column] == " " && count) {
1483
+ range.start.column--;
1484
+ count--;
1485
+ }
1486
+ this.selection.setSelectionRange(range);
1487
+ indentString = "\t";
1488
+ }
1489
+ return this.insert(indentString);
1490
+ };
1491
+
1492
+ /**
1493
+ * Indents the current line.
1494
+ * @related EditSession.indentRows
1495
+ **/
1496
+ this.blockIndent = function() {
1497
+ var rows = this.$getSelectedRows();
1498
+ this.session.indentRows(rows.first, rows.last, "\t");
1499
+ };
1500
+
1501
+ /**
1502
+ * Outdents the current line.
1503
+ * @related EditSession.outdentRows
1504
+ **/
1505
+ this.blockOutdent = function() {
1506
+ var selection = this.session.getSelection();
1507
+ this.session.outdentRows(selection.getRange());
1508
+ };
1509
+
1510
+ // TODO: move out of core when we have good mechanism for managing extensions
1511
+ this.sortLines = function() {
1512
+ var rows = this.$getSelectedRows();
1513
+ var session = this.session;
1514
+
1515
+ var lines = [];
1516
+ for (i = rows.first; i <= rows.last; i++)
1517
+ lines.push(session.getLine(i));
1518
+
1519
+ lines.sort(function(a, b) {
1520
+ if (a.toLowerCase() < b.toLowerCase()) return -1;
1521
+ if (a.toLowerCase() > b.toLowerCase()) return 1;
1522
+ return 0;
1523
+ });
1524
+
1525
+ var deleteRange = new Range(0, 0, 0, 0);
1526
+ for (var i = rows.first; i <= rows.last; i++) {
1527
+ var line = session.getLine(i);
1528
+ deleteRange.start.row = i;
1529
+ deleteRange.end.row = i;
1530
+ deleteRange.end.column = line.length;
1531
+ session.replace(deleteRange, lines[i-rows.first]);
1532
+ }
1533
+ };
1534
+
1535
+ /**
1536
+ * Given the currently selected range, this function either comments all the lines, or uncomments all of them.
1537
+ **/
1538
+ this.toggleCommentLines = function() {
1539
+ var state = this.session.getState(this.getCursorPosition().row);
1540
+ var rows = this.$getSelectedRows();
1541
+ this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);
1542
+ };
1543
+
1544
+ this.toggleBlockComment = function() {
1545
+ var cursor = this.getCursorPosition();
1546
+ var state = this.session.getState(cursor.row);
1547
+ var range = this.getSelectionRange();
1548
+ this.session.getMode().toggleBlockComment(state, this.session, range, cursor);
1549
+ };
1550
+
1551
+ /**
1552
+ * Works like [[EditSession.getTokenAt]], except it returns a number.
1553
+ * @returns {Number}
1554
+ **/
1555
+ this.getNumberAt = function(row, column) {
1556
+ var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g;
1557
+ _numberRx.lastIndex = 0;
1558
+
1559
+ var s = this.session.getLine(row);
1560
+ while (_numberRx.lastIndex < column) {
1561
+ var m = _numberRx.exec(s);
1562
+ if(m.index <= column && m.index+m[0].length >= column){
1563
+ var number = {
1564
+ value: m[0],
1565
+ start: m.index,
1566
+ end: m.index+m[0].length
1567
+ };
1568
+ return number;
1569
+ }
1570
+ }
1571
+ return null;
1572
+ };
1573
+
1574
+ /**
1575
+ * If the character before the cursor is a number, this functions changes its value by `amount`.
1576
+ * @param {Number} amount The value to change the numeral by (can be negative to decrease value)
1577
+ *
1578
+ **/
1579
+ this.modifyNumber = function(amount) {
1580
+ var row = this.selection.getCursor().row;
1581
+ var column = this.selection.getCursor().column;
1582
+
1583
+ // get the char before the cursor
1584
+ var charRange = new Range(row, column-1, row, column);
1585
+
1586
+ var c = this.session.getTextRange(charRange);
1587
+ // if the char is a digit
1588
+ if (!isNaN(parseFloat(c)) && isFinite(c)) {
1589
+ // get the whole number the digit is part of
1590
+ var nr = this.getNumberAt(row, column);
1591
+ // if number found
1592
+ if (nr) {
1593
+ var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end;
1594
+ var decimals = nr.start + nr.value.length - fp;
1595
+
1596
+ var t = parseFloat(nr.value);
1597
+ t *= Math.pow(10, decimals);
1598
+
1599
+
1600
+ if(fp !== nr.end && column < fp){
1601
+ amount *= Math.pow(10, nr.end - column - 1);
1602
+ } else {
1603
+ amount *= Math.pow(10, nr.end - column);
1604
+ }
1605
+
1606
+ t += amount;
1607
+ t /= Math.pow(10, decimals);
1608
+ var nnr = t.toFixed(decimals);
1609
+
1610
+ //update number
1611
+ var replaceRange = new Range(row, nr.start, row, nr.end);
1612
+ this.session.replace(replaceRange, nnr);
1613
+
1614
+ //reposition the cursor
1615
+ this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length));
1616
+
1617
+ }
1618
+ }
1619
+ };
1620
+
1621
+ /**
1622
+ * Removes all the lines in the current selection
1623
+ * @related EditSession.remove
1624
+ **/
1625
+ this.removeLines = function() {
1626
+ var rows = this.$getSelectedRows();
1627
+ var range;
1628
+ if (rows.first === 0 || rows.last+1 < this.session.getLength())
1629
+ range = new Range(rows.first, 0, rows.last+1, 0);
1630
+ else
1631
+ range = new Range(
1632
+ rows.first-1, this.session.getLine(rows.first-1).length,
1633
+ rows.last, this.session.getLine(rows.last).length
1634
+ );
1635
+ this.session.remove(range);
1636
+ this.clearSelection();
1637
+ };
1638
+
1639
+ this.duplicateSelection = function() {
1640
+ var sel = this.selection;
1641
+ var doc = this.session;
1642
+ var range = sel.getRange();
1643
+ var reverse = sel.isBackwards();
1644
+ if (range.isEmpty()) {
1645
+ var row = range.start.row;
1646
+ doc.duplicateLines(row, row);
1647
+ } else {
1648
+ var point = reverse ? range.start : range.end;
1649
+ var endPoint = doc.insert(point, doc.getTextRange(range), false);
1650
+ range.start = point;
1651
+ range.end = endPoint;
1652
+
1653
+ sel.setSelectionRange(range, reverse);
1654
+ }
1655
+ };
1656
+
1657
+ /**
1658
+ * Shifts all the selected lines down one row.
1659
+ *
1660
+ * @returns {Number} On success, it returns -1.
1661
+ * @related EditSession.moveLinesUp
1662
+ **/
1663
+ this.moveLinesDown = function() {
1664
+ this.$moveLines(1, false);
1665
+ };
1666
+
1667
+ /**
1668
+ * Shifts all the selected lines up one row.
1669
+ * @returns {Number} On success, it returns -1.
1670
+ * @related EditSession.moveLinesDown
1671
+ **/
1672
+ this.moveLinesUp = function() {
1673
+ this.$moveLines(-1, false);
1674
+ };
1675
+
1676
+ /**
1677
+ * Moves a range of text from the given range to the given position. `toPosition` is an object that looks like this:
1678
+ * ```json
1679
+ * { row: newRowLocation, column: newColumnLocation }
1680
+ * ```
1681
+ * @param {Range} fromRange The range of text you want moved within the document
1682
+ * @param {Object} toPosition The location (row and column) where you want to move the text to
1683
+ *
1684
+ * @returns {Range} The new range where the text was moved to.
1685
+ * @related EditSession.moveText
1686
+ **/
1687
+ this.moveText = function(range, toPosition, copy) {
1688
+ return this.session.moveText(range, toPosition, copy);
1689
+ };
1690
+
1691
+ /**
1692
+ * Copies all the selected lines up one row.
1693
+ * @returns {Number} On success, returns 0.
1694
+ *
1695
+ **/
1696
+ this.copyLinesUp = function() {
1697
+ this.$moveLines(-1, true);
1698
+ };
1699
+
1700
+ /**
1701
+ * Copies all the selected lines down one row.
1702
+ * @returns {Number} On success, returns the number of new rows added; in other words, `lastRow - firstRow + 1`.
1703
+ * @related EditSession.duplicateLines
1704
+ *
1705
+ **/
1706
+ this.copyLinesDown = function() {
1707
+ this.$moveLines(1, true);
1708
+ };
1709
+
1710
+ /**
1711
+ * for internal use
1712
+ * @ignore
1713
+ *
1714
+ **/
1715
+ this.$moveLines = function(dir, copy) {
1716
+ var rows, moved;
1717
+ var selection = this.selection;
1718
+ if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {
1719
+ var range = selection.toOrientedRange();
1720
+ rows = this.$getSelectedRows(range);
1721
+ moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir);
1722
+ if (copy && dir == -1) moved = 0;
1723
+ range.moveBy(moved, 0);
1724
+ selection.fromOrientedRange(range);
1725
+ } else {
1726
+ var ranges = selection.rangeList.ranges;
1727
+ selection.rangeList.detach(this.session);
1728
+ this.inVirtualSelectionMode = true;
1729
+
1730
+ var diff = 0;
1731
+ var totalDiff = 0;
1732
+ var l = ranges.length;
1733
+ for (var i = 0; i < l; i++) {
1734
+ var rangeIndex = i;
1735
+ ranges[i].moveBy(diff, 0);
1736
+ rows = this.$getSelectedRows(ranges[i]);
1737
+ var first = rows.first;
1738
+ var last = rows.last;
1739
+ while (++i < l) {
1740
+ if (totalDiff) ranges[i].moveBy(totalDiff, 0);
1741
+ var subRows = this.$getSelectedRows(ranges[i]);
1742
+ if (copy && subRows.first != last)
1743
+ break;
1744
+ else if (!copy && subRows.first > last + 1)
1745
+ break;
1746
+ last = subRows.last;
1747
+ }
1748
+ i--;
1749
+ diff = this.session.$moveLines(first, last, copy ? 0 : dir);
1750
+ if (copy && dir == -1) rangeIndex = i + 1;
1751
+ while (rangeIndex <= i) {
1752
+ ranges[rangeIndex].moveBy(diff, 0);
1753
+ rangeIndex++;
1754
+ }
1755
+ if (!copy) diff = 0;
1756
+ totalDiff += diff;
1757
+ }
1758
+
1759
+ selection.fromOrientedRange(selection.ranges[0]);
1760
+ selection.rangeList.attach(this.session);
1761
+ this.inVirtualSelectionMode = false;
1762
+ }
1763
+ };
1764
+
1765
+ /**
1766
+ * Returns an object indicating the currently selected rows. The object looks like this:
1767
+ *
1768
+ * ```json
1769
+ * { first: range.start.row, last: range.end.row }
1770
+ * ```
1771
+ *
1772
+ * @returns {Object}
1773
+ **/
1774
+ this.$getSelectedRows = function(range) {
1775
+ range = (range || this.getSelectionRange()).collapseRows();
1776
+
1777
+ return {
1778
+ first: this.session.getRowFoldStart(range.start.row),
1779
+ last: this.session.getRowFoldEnd(range.end.row)
1780
+ };
1781
+ };
1782
+
1783
+ this.onCompositionStart = function(text) {
1784
+ this.renderer.showComposition(this.getCursorPosition());
1785
+ };
1786
+
1787
+ this.onCompositionUpdate = function(text) {
1788
+ this.renderer.setCompositionText(text);
1789
+ };
1790
+
1791
+ this.onCompositionEnd = function() {
1792
+ this.renderer.hideComposition();
1793
+ };
1794
+
1795
+ /**
1796
+ * {:VirtualRenderer.getFirstVisibleRow}
1797
+ *
1798
+ * @returns {Number}
1799
+ * @related VirtualRenderer.getFirstVisibleRow
1800
+ **/
1801
+ this.getFirstVisibleRow = function() {
1802
+ return this.renderer.getFirstVisibleRow();
1803
+ };
1804
+
1805
+ /**
1806
+ * {:VirtualRenderer.getLastVisibleRow}
1807
+ *
1808
+ * @returns {Number}
1809
+ * @related VirtualRenderer.getLastVisibleRow
1810
+ **/
1811
+ this.getLastVisibleRow = function() {
1812
+ return this.renderer.getLastVisibleRow();
1813
+ };
1814
+
1815
+ /**
1816
+ * Indicates if the row is currently visible on the screen.
1817
+ * @param {Number} row The row to check
1818
+ *
1819
+ * @returns {Boolean}
1820
+ **/
1821
+ this.isRowVisible = function(row) {
1822
+ return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());
1823
+ };
1824
+
1825
+ /**
1826
+ * Indicates if the entire row is currently visible on the screen.
1827
+ * @param {Number} row The row to check
1828
+ *
1829
+ *
1830
+ * @returns {Boolean}
1831
+ **/
1832
+ this.isRowFullyVisible = function(row) {
1833
+ return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());
1834
+ };
1835
+
1836
+ /**
1837
+ * Returns the number of currently visibile rows.
1838
+ * @returns {Number}
1839
+ **/
1840
+ this.$getVisibleRowCount = function() {
1841
+ return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;
1842
+ };
1843
+
1844
+ this.$moveByPage = function(dir, select) {
1845
+ var renderer = this.renderer;
1846
+ var config = this.renderer.layerConfig;
1847
+ var rows = dir * Math.floor(config.height / config.lineHeight);
1848
+
1849
+ this.$blockScrolling++;
1850
+ if (select === true) {
1851
+ this.selection.$moveSelection(function(){
1852
+ this.moveCursorBy(rows, 0);
1853
+ });
1854
+ } else if (select === false) {
1855
+ this.selection.moveCursorBy(rows, 0);
1856
+ this.selection.clearSelection();
1857
+ }
1858
+ this.$blockScrolling--;
1859
+
1860
+ var scrollTop = renderer.scrollTop;
1861
+
1862
+ renderer.scrollBy(0, rows * config.lineHeight);
1863
+ if (select != null)
1864
+ renderer.scrollCursorIntoView(null, 0.5);
1865
+
1866
+ renderer.animateScrolling(scrollTop);
1867
+ };
1868
+
1869
+ /**
1870
+ * Selects the text from the current position of the document until where a "page down" finishes.
1871
+ **/
1872
+ this.selectPageDown = function() {
1873
+ this.$moveByPage(1, true);
1874
+ };
1875
+
1876
+ /**
1877
+ * Selects the text from the current position of the document until where a "page up" finishes.
1878
+ **/
1879
+ this.selectPageUp = function() {
1880
+ this.$moveByPage(-1, true);
1881
+ };
1882
+
1883
+ /**
1884
+ * Shifts the document to wherever "page down" is, as well as moving the cursor position.
1885
+ **/
1886
+ this.gotoPageDown = function() {
1887
+ this.$moveByPage(1, false);
1888
+ };
1889
+
1890
+ /**
1891
+ * Shifts the document to wherever "page up" is, as well as moving the cursor position.
1892
+ **/
1893
+ this.gotoPageUp = function() {
1894
+ this.$moveByPage(-1, false);
1895
+ };
1896
+
1897
+ /**
1898
+ * Scrolls the document to wherever "page down" is, without changing the cursor position.
1899
+ **/
1900
+ this.scrollPageDown = function() {
1901
+ this.$moveByPage(1);
1902
+ };
1903
+
1904
+ /**
1905
+ * Scrolls the document to wherever "page up" is, without changing the cursor position.
1906
+ **/
1907
+ this.scrollPageUp = function() {
1908
+ this.$moveByPage(-1);
1909
+ };
1910
+
1911
+ /**
1912
+ * Moves the editor to the specified row.
1913
+ * @related VirtualRenderer.scrollToRow
1914
+ **/
1915
+ this.scrollToRow = function(row) {
1916
+ this.renderer.scrollToRow(row);
1917
+ };
1918
+
1919
+ /**
1920
+ * Scrolls to a line. If `center` is `true`, it puts the line in middle of screen (or attempts to).
1921
+ * @param {Number} line The line to scroll to
1922
+ * @param {Boolean} center If `true`
1923
+ * @param {Boolean} animate If `true` animates scrolling
1924
+ * @param {Function} callback Function to be called when the animation has finished
1925
+ *
1926
+ *
1927
+ * @related VirtualRenderer.scrollToLine
1928
+ **/
1929
+ this.scrollToLine = function(line, center, animate, callback) {
1930
+ this.renderer.scrollToLine(line, center, animate, callback);
1931
+ };
1932
+
1933
+ /**
1934
+ * Attempts to center the current selection on the screen.
1935
+ **/
1936
+ this.centerSelection = function() {
1937
+ var range = this.getSelectionRange();
1938
+ var pos = {
1939
+ row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),
1940
+ column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)
1941
+ };
1942
+ this.renderer.alignCursor(pos, 0.5);
1943
+ };
1944
+
1945
+ /**
1946
+ * Gets the current position of the cursor.
1947
+ * @returns {Object} An object that looks something like this:
1948
+ *
1949
+ * ```json
1950
+ * { row: currRow, column: currCol }
1951
+ * ```
1952
+ *
1953
+ * @related Selection.getCursor
1954
+ **/
1955
+ this.getCursorPosition = function() {
1956
+ return this.selection.getCursor();
1957
+ };
1958
+
1959
+ /**
1960
+ * Returns the screen position of the cursor.
1961
+ * @returns {Number}
1962
+ * @related EditSession.documentToScreenPosition
1963
+ **/
1964
+ this.getCursorPositionScreen = function() {
1965
+ return this.session.documentToScreenPosition(this.getCursorPosition());
1966
+ };
1967
+
1968
+ /**
1969
+ * {:Selection.getRange}
1970
+ * @returns {Range}
1971
+ * @related Selection.getRange
1972
+ **/
1973
+ this.getSelectionRange = function() {
1974
+ return this.selection.getRange();
1975
+ };
1976
+
1977
+
1978
+ /**
1979
+ * Selects all the text in editor.
1980
+ * @related Selection.selectAll
1981
+ **/
1982
+ this.selectAll = function() {
1983
+ this.$blockScrolling += 1;
1984
+ this.selection.selectAll();
1985
+ this.$blockScrolling -= 1;
1986
+ };
1987
+
1988
+ /**
1989
+ * {:Selection.clearSelection}
1990
+ * @related Selection.clearSelection
1991
+ **/
1992
+ this.clearSelection = function() {
1993
+ this.selection.clearSelection();
1994
+ };
1995
+
1996
+ /**
1997
+ * Moves the cursor to the specified row and column. Note that this does not de-select the current selection.
1998
+ * @param {Number} row The new row number
1999
+ * @param {Number} column The new column number
2000
+ *
2001
+ *
2002
+ * @related Selection.moveCursorTo
2003
+ **/
2004
+ this.moveCursorTo = function(row, column) {
2005
+ this.selection.moveCursorTo(row, column);
2006
+ };
2007
+
2008
+ /**
2009
+ * Moves the cursor to the position indicated by `pos.row` and `pos.column`.
2010
+ * @param {Object} pos An object with two properties, row and column
2011
+ *
2012
+ *
2013
+ * @related Selection.moveCursorToPosition
2014
+ **/
2015
+ this.moveCursorToPosition = function(pos) {
2016
+ this.selection.moveCursorToPosition(pos);
2017
+ };
2018
+
2019
+ /**
2020
+ * Moves the cursor's row and column to the next matching bracket or HTML tag.
2021
+ *
2022
+ **/
2023
+ this.jumpToMatching = function(select, expand) {
2024
+ var cursor = this.getCursorPosition();
2025
+ var iterator = new TokenIterator(this.session, cursor.row, cursor.column);
2026
+ var prevToken = iterator.getCurrentToken();
2027
+ var token = prevToken || iterator.stepForward();
2028
+
2029
+ if (!token) return;
2030
+
2031
+ //get next closing tag or bracket
2032
+ var matchType;
2033
+ var found = false;
2034
+ var depth = {};
2035
+ var i = cursor.column - token.start;
2036
+ var bracketType;
2037
+ var brackets = {
2038
+ ")": "(",
2039
+ "(": "(",
2040
+ "]": "[",
2041
+ "[": "[",
2042
+ "{": "{",
2043
+ "}": "{"
2044
+ };
2045
+
2046
+ do {
2047
+ if (token.value.match(/[{}()\[\]]/g)) {
2048
+ for (; i < token.value.length && !found; i++) {
2049
+ if (!brackets[token.value[i]]) {
2050
+ continue;
2051
+ }
2052
+
2053
+ bracketType = brackets[token.value[i]] + '.' + token.type.replace("rparen", "lparen");
2054
+
2055
+ if (isNaN(depth[bracketType])) {
2056
+ depth[bracketType] = 0;
2057
+ }
2058
+
2059
+ switch (token.value[i]) {
2060
+ case '(':
2061
+ case '[':
2062
+ case '{':
2063
+ depth[bracketType]++;
2064
+ break;
2065
+ case ')':
2066
+ case ']':
2067
+ case '}':
2068
+ depth[bracketType]--;
2069
+
2070
+ if (depth[bracketType] === -1) {
2071
+ matchType = 'bracket';
2072
+ found = true;
2073
+ }
2074
+ break;
2075
+ }
2076
+ }
2077
+ }
2078
+ else if (token && token.type.indexOf('tag-name') !== -1) {
2079
+ if (isNaN(depth[token.value])) {
2080
+ depth[token.value] = 0;
2081
+ }
2082
+
2083
+ if (prevToken.value === '<') {
2084
+ depth[token.value]++;
2085
+ }
2086
+ else if (prevToken.value === '</') {
2087
+ depth[token.value]--;
2088
+ }
2089
+
2090
+ if (depth[token.value] === -1) {
2091
+ matchType = 'tag';
2092
+ found = true;
2093
+ }
2094
+ }
2095
+
2096
+ if (!found) {
2097
+ prevToken = token;
2098
+ token = iterator.stepForward();
2099
+ i = 0;
2100
+ }
2101
+ } while (token && !found);
2102
+
2103
+ //no match found
2104
+ if (!matchType)
2105
+ return;
2106
+
2107
+ var range, pos;
2108
+ if (matchType === 'bracket') {
2109
+ range = this.session.getBracketRange(cursor);
2110
+ if (!range) {
2111
+ range = new Range(
2112
+ iterator.getCurrentTokenRow(),
2113
+ iterator.getCurrentTokenColumn() + i - 1,
2114
+ iterator.getCurrentTokenRow(),
2115
+ iterator.getCurrentTokenColumn() + i - 1
2116
+ );
2117
+ pos = range.start;
2118
+ if (expand || pos.row === cursor.row && Math.abs(pos.column - cursor.column) < 2)
2119
+ range = this.session.getBracketRange(pos);
2120
+ }
2121
+ }
2122
+ else if (matchType === 'tag') {
2123
+ if (token && token.type.indexOf('tag-name') !== -1)
2124
+ var tag = token.value;
2125
+ else
2126
+ return;
2127
+
2128
+ range = new Range(
2129
+ iterator.getCurrentTokenRow(),
2130
+ iterator.getCurrentTokenColumn() - 2,
2131
+ iterator.getCurrentTokenRow(),
2132
+ iterator.getCurrentTokenColumn() - 2
2133
+ );
2134
+
2135
+ //find matching tag
2136
+ if (range.compare(cursor.row, cursor.column) === 0) {
2137
+ found = false;
2138
+ do {
2139
+ token = prevToken;
2140
+ prevToken = iterator.stepBackward();
2141
+
2142
+ if (prevToken) {
2143
+ if (prevToken.type.indexOf('tag-close') !== -1) {
2144
+ range.setEnd(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1);
2145
+ }
2146
+
2147
+ if (token.value === tag && token.type.indexOf('tag-name') !== -1) {
2148
+ if (prevToken.value === '<') {
2149
+ depth[tag]++;
2150
+ }
2151
+ else if (prevToken.value === '</') {
2152
+ depth[tag]--;
2153
+ }
2154
+
2155
+ if (depth[tag] === 0)
2156
+ found = true;
2157
+ }
2158
+ }
2159
+ } while (prevToken && !found);
2160
+ }
2161
+
2162
+ //we found it
2163
+ if (token && token.type.indexOf('tag-name')) {
2164
+ pos = range.start;
2165
+ if (pos.row == cursor.row && Math.abs(pos.column - cursor.column) < 2)
2166
+ pos = range.end;
2167
+ }
2168
+ }
2169
+
2170
+ pos = range && range.cursor || pos;
2171
+ if (pos) {
2172
+ if (select) {
2173
+ if (range && expand) {
2174
+ this.selection.setRange(range);
2175
+ } else if (range && range.isEqual(this.getSelectionRange())) {
2176
+ this.clearSelection();
2177
+ } else {
2178
+ this.selection.selectTo(pos.row, pos.column);
2179
+ }
2180
+ } else {
2181
+ this.selection.moveTo(pos.row, pos.column);
2182
+ }
2183
+ }
2184
+ };
2185
+
2186
+ /**
2187
+ * Moves the cursor to the specified line number, and also into the indiciated column.
2188
+ * @param {Number} lineNumber The line number to go to
2189
+ * @param {Number} column A column number to go to
2190
+ * @param {Boolean} animate If `true` animates scolling
2191
+ *
2192
+ **/
2193
+ this.gotoLine = function(lineNumber, column, animate) {
2194
+ this.selection.clearSelection();
2195
+ this.session.unfold({row: lineNumber - 1, column: column || 0});
2196
+
2197
+ this.$blockScrolling += 1;
2198
+ // todo: find a way to automatically exit multiselect mode
2199
+ this.exitMultiSelectMode && this.exitMultiSelectMode();
2200
+ this.moveCursorTo(lineNumber - 1, column || 0);
2201
+ this.$blockScrolling -= 1;
2202
+
2203
+ if (!this.isRowFullyVisible(lineNumber - 1))
2204
+ this.scrollToLine(lineNumber - 1, true, animate);
2205
+ };
2206
+
2207
+ /**
2208
+ * Moves the cursor to the specified row and column. Note that this does de-select the current selection.
2209
+ * @param {Number} row The new row number
2210
+ * @param {Number} column The new column number
2211
+ *
2212
+ *
2213
+ * @related Editor.moveCursorTo
2214
+ **/
2215
+ this.navigateTo = function(row, column) {
2216
+ this.selection.moveTo(row, column);
2217
+ };
2218
+
2219
+ /**
2220
+ * Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
2221
+ * @param {Number} times The number of times to change navigation
2222
+ *
2223
+ *
2224
+ **/
2225
+ this.navigateUp = function(times) {
2226
+ if (this.selection.isMultiLine() && !this.selection.isBackwards()) {
2227
+ var selectionStart = this.selection.anchor.getPosition();
2228
+ return this.moveCursorToPosition(selectionStart);
2229
+ }
2230
+ this.selection.clearSelection();
2231
+ this.selection.moveCursorBy(-times || -1, 0);
2232
+ };
2233
+
2234
+ /**
2235
+ * Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
2236
+ * @param {Number} times The number of times to change navigation
2237
+ *
2238
+ *
2239
+ **/
2240
+ this.navigateDown = function(times) {
2241
+ if (this.selection.isMultiLine() && this.selection.isBackwards()) {
2242
+ var selectionEnd = this.selection.anchor.getPosition();
2243
+ return this.moveCursorToPosition(selectionEnd);
2244
+ }
2245
+ this.selection.clearSelection();
2246
+ this.selection.moveCursorBy(times || 1, 0);
2247
+ };
2248
+
2249
+ /**
2250
+ * Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
2251
+ * @param {Number} times The number of times to change navigation
2252
+ *
2253
+ *
2254
+ **/
2255
+ this.navigateLeft = function(times) {
2256
+ if (!this.selection.isEmpty()) {
2257
+ var selectionStart = this.getSelectionRange().start;
2258
+ this.moveCursorToPosition(selectionStart);
2259
+ }
2260
+ else {
2261
+ times = times || 1;
2262
+ while (times--) {
2263
+ this.selection.moveCursorLeft();
2264
+ }
2265
+ }
2266
+ this.clearSelection();
2267
+ };
2268
+
2269
+ /**
2270
+ * Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
2271
+ * @param {Number} times The number of times to change navigation
2272
+ *
2273
+ *
2274
+ **/
2275
+ this.navigateRight = function(times) {
2276
+ if (!this.selection.isEmpty()) {
2277
+ var selectionEnd = this.getSelectionRange().end;
2278
+ this.moveCursorToPosition(selectionEnd);
2279
+ }
2280
+ else {
2281
+ times = times || 1;
2282
+ while (times--) {
2283
+ this.selection.moveCursorRight();
2284
+ }
2285
+ }
2286
+ this.clearSelection();
2287
+ };
2288
+
2289
+ /**
2290
+ *
2291
+ * Moves the cursor to the start of the current line. Note that this does de-select the current selection.
2292
+ **/
2293
+ this.navigateLineStart = function() {
2294
+ this.selection.moveCursorLineStart();
2295
+ this.clearSelection();
2296
+ };
2297
+
2298
+ /**
2299
+ *
2300
+ * Moves the cursor to the end of the current line. Note that this does de-select the current selection.
2301
+ **/
2302
+ this.navigateLineEnd = function() {
2303
+ this.selection.moveCursorLineEnd();
2304
+ this.clearSelection();
2305
+ };
2306
+
2307
+ /**
2308
+ *
2309
+ * Moves the cursor to the end of the current file. Note that this does de-select the current selection.
2310
+ **/
2311
+ this.navigateFileEnd = function() {
2312
+ this.selection.moveCursorFileEnd();
2313
+ this.clearSelection();
2314
+ };
2315
+
2316
+ /**
2317
+ *
2318
+ * Moves the cursor to the start of the current file. Note that this does de-select the current selection.
2319
+ **/
2320
+ this.navigateFileStart = function() {
2321
+ this.selection.moveCursorFileStart();
2322
+ this.clearSelection();
2323
+ };
2324
+
2325
+ /**
2326
+ *
2327
+ * Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.
2328
+ **/
2329
+ this.navigateWordRight = function() {
2330
+ this.selection.moveCursorWordRight();
2331
+ this.clearSelection();
2332
+ };
2333
+
2334
+ /**
2335
+ *
2336
+ * Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.
2337
+ **/
2338
+ this.navigateWordLeft = function() {
2339
+ this.selection.moveCursorWordLeft();
2340
+ this.clearSelection();
2341
+ };
2342
+
2343
+ /**
2344
+ * Replaces the first occurance of `options.needle` with the value in `replacement`.
2345
+ * @param {String} replacement The text to replace with
2346
+ * @param {Object} options The [[Search `Search`]] options to use
2347
+ *
2348
+ *
2349
+ **/
2350
+ this.replace = function(replacement, options) {
2351
+ if (options)
2352
+ this.$search.set(options);
2353
+
2354
+ var range = this.$search.find(this.session);
2355
+ var replaced = 0;
2356
+ if (!range)
2357
+ return replaced;
2358
+
2359
+ if (this.$tryReplace(range, replacement)) {
2360
+ replaced = 1;
2361
+ }
2362
+ if (range !== null) {
2363
+ this.selection.setSelectionRange(range);
2364
+ this.renderer.scrollSelectionIntoView(range.start, range.end);
2365
+ }
2366
+
2367
+ return replaced;
2368
+ };
2369
+
2370
+ /**
2371
+ * Replaces all occurances of `options.needle` with the value in `replacement`.
2372
+ * @param {String} replacement The text to replace with
2373
+ * @param {Object} options The [[Search `Search`]] options to use
2374
+ *
2375
+ *
2376
+ **/
2377
+ this.replaceAll = function(replacement, options) {
2378
+ if (options) {
2379
+ this.$search.set(options);
2380
+ }
2381
+
2382
+ var ranges = this.$search.findAll(this.session);
2383
+ var replaced = 0;
2384
+ if (!ranges.length)
2385
+ return replaced;
2386
+
2387
+ this.$blockScrolling += 1;
2388
+
2389
+ var selection = this.getSelectionRange();
2390
+ this.selection.moveTo(0, 0);
2391
+
2392
+ for (var i = ranges.length - 1; i >= 0; --i) {
2393
+ if(this.$tryReplace(ranges[i], replacement)) {
2394
+ replaced++;
2395
+ }
2396
+ }
2397
+
2398
+ this.selection.setSelectionRange(selection);
2399
+ this.$blockScrolling -= 1;
2400
+
2401
+ return replaced;
2402
+ };
2403
+
2404
+ this.$tryReplace = function(range, replacement) {
2405
+ var input = this.session.getTextRange(range);
2406
+ replacement = this.$search.replace(input, replacement);
2407
+ if (replacement !== null) {
2408
+ range.end = this.session.replace(range, replacement);
2409
+ return range;
2410
+ } else {
2411
+ return null;
2412
+ }
2413
+ };
2414
+
2415
+ /**
2416
+ * {:Search.getOptions} For more information on `options`, see [[Search `Search`]].
2417
+ * @related Search.getOptions
2418
+ * @returns {Object}
2419
+ **/
2420
+ this.getLastSearchOptions = function() {
2421
+ return this.$search.getOptions();
2422
+ };
2423
+
2424
+ /**
2425
+ * Attempts to find `needle` within the document. For more information on `options`, see [[Search `Search`]].
2426
+ * @param {String} needle The text to search for (optional)
2427
+ * @param {Object} options An object defining various search properties
2428
+ * @param {Boolean} animate If `true` animate scrolling
2429
+ *
2430
+ *
2431
+ * @related Search.find
2432
+ **/
2433
+ this.find = function(needle, options, animate) {
2434
+ if (!options)
2435
+ options = {};
2436
+
2437
+ if (typeof needle == "string" || needle instanceof RegExp)
2438
+ options.needle = needle;
2439
+ else if (typeof needle == "object")
2440
+ oop.mixin(options, needle);
2441
+
2442
+ var range = this.selection.getRange();
2443
+ if (options.needle == null) {
2444
+ needle = this.session.getTextRange(range)
2445
+ || this.$search.$options.needle;
2446
+ if (!needle) {
2447
+ range = this.session.getWordRange(range.start.row, range.start.column);
2448
+ needle = this.session.getTextRange(range);
2449
+ }
2450
+ this.$search.set({needle: needle});
2451
+ }
2452
+
2453
+ this.$search.set(options);
2454
+ if (!options.start)
2455
+ this.$search.set({start: range});
2456
+
2457
+ var newRange = this.$search.find(this.session);
2458
+ if (options.preventScroll)
2459
+ return newRange;
2460
+ if (newRange) {
2461
+ this.revealRange(newRange, animate);
2462
+ return newRange;
2463
+ }
2464
+ // clear selection if nothing is found
2465
+ if (options.backwards)
2466
+ range.start = range.end;
2467
+ else
2468
+ range.end = range.start;
2469
+ this.selection.setRange(range);
2470
+ };
2471
+
2472
+ /**
2473
+ * Performs another search for `needle` in the document. For more information on `options`, see [[Search `Search`]].
2474
+ * @param {Object} options search options
2475
+ * @param {Boolean} animate If `true` animate scrolling
2476
+ *
2477
+ *
2478
+ * @related Editor.find
2479
+ **/
2480
+ this.findNext = function(options, animate) {
2481
+ this.find({skipCurrent: true, backwards: false}, options, animate);
2482
+ };
2483
+
2484
+ /**
2485
+ * Performs a search for `needle` backwards. For more information on `options`, see [[Search `Search`]].
2486
+ * @param {Object} options search options
2487
+ * @param {Boolean} animate If `true` animate scrolling
2488
+ *
2489
+ *
2490
+ * @related Editor.find
2491
+ **/
2492
+ this.findPrevious = function(options, animate) {
2493
+ this.find(options, {skipCurrent: true, backwards: true}, animate);
2494
+ };
2495
+
2496
+ this.revealRange = function(range, animate) {
2497
+ this.$blockScrolling += 1;
2498
+ this.session.unfold(range);
2499
+ this.selection.setSelectionRange(range);
2500
+ this.$blockScrolling -= 1;
2501
+
2502
+ var scrollTop = this.renderer.scrollTop;
2503
+ this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);
2504
+ if (animate !== false)
2505
+ this.renderer.animateScrolling(scrollTop);
2506
+ };
2507
+
2508
+ /**
2509
+ * {:UndoManager.undo}
2510
+ * @related UndoManager.undo
2511
+ **/
2512
+ this.undo = function() {
2513
+ this.$blockScrolling++;
2514
+ this.session.getUndoManager().undo();
2515
+ this.$blockScrolling--;
2516
+ this.renderer.scrollCursorIntoView(null, 0.5);
2517
+ };
2518
+
2519
+ /**
2520
+ * {:UndoManager.redo}
2521
+ * @related UndoManager.redo
2522
+ **/
2523
+ this.redo = function() {
2524
+ this.$blockScrolling++;
2525
+ this.session.getUndoManager().redo();
2526
+ this.$blockScrolling--;
2527
+ this.renderer.scrollCursorIntoView(null, 0.5);
2528
+ };
2529
+
2530
+ /**
2531
+ *
2532
+ * Cleans up the entire editor.
2533
+ **/
2534
+ this.destroy = function() {
2535
+ this.renderer.destroy();
2536
+ this._signal("destroy", this);
2537
+ if (this.session) {
2538
+ this.session.destroy();
2539
+ }
2540
+ };
2541
+
2542
+ /**
2543
+ * Enables automatic scrolling of the cursor into view when editor itself is inside scrollable element
2544
+ * @param {Boolean} enable default true
2545
+ **/
2546
+ this.setAutoScrollEditorIntoView = function(enable) {
2547
+ if (!enable)
2548
+ return;
2549
+ var rect;
2550
+ var self = this;
2551
+ var shouldScroll = false;
2552
+ if (!this.$scrollAnchor)
2553
+ this.$scrollAnchor = document.createElement("div");
2554
+ var scrollAnchor = this.$scrollAnchor;
2555
+ scrollAnchor.style.cssText = "position:absolute";
2556
+ this.container.insertBefore(scrollAnchor, this.container.firstChild);
2557
+ var onChangeSelection = this.on("changeSelection", function() {
2558
+ shouldScroll = true;
2559
+ });
2560
+ // needed to not trigger sync reflow
2561
+ var onBeforeRender = this.renderer.on("beforeRender", function() {
2562
+ if (shouldScroll)
2563
+ rect = self.renderer.container.getBoundingClientRect();
2564
+ });
2565
+ var onAfterRender = this.renderer.on("afterRender", function() {
2566
+ if (shouldScroll && rect && (self.isFocused()
2567
+ || self.searchBox && self.searchBox.isFocused())
2568
+ ) {
2569
+ var renderer = self.renderer;
2570
+ var pos = renderer.$cursorLayer.$pixelPos;
2571
+ var config = renderer.layerConfig;
2572
+ var top = pos.top - config.offset;
2573
+ if (pos.top >= 0 && top + rect.top < 0) {
2574
+ shouldScroll = true;
2575
+ } else if (pos.top < config.height &&
2576
+ pos.top + rect.top + config.lineHeight > window.innerHeight) {
2577
+ shouldScroll = false;
2578
+ } else {
2579
+ shouldScroll = null;
2580
+ }
2581
+ if (shouldScroll != null) {
2582
+ scrollAnchor.style.top = top + "px";
2583
+ scrollAnchor.style.left = pos.left + "px";
2584
+ scrollAnchor.style.height = config.lineHeight + "px";
2585
+ scrollAnchor.scrollIntoView(shouldScroll);
2586
+ }
2587
+ shouldScroll = rect = null;
2588
+ }
2589
+ });
2590
+ this.setAutoScrollEditorIntoView = function(enable) {
2591
+ if (enable)
2592
+ return;
2593
+ delete this.setAutoScrollEditorIntoView;
2594
+ this.removeEventListener("changeSelection", onChangeSelection);
2595
+ this.renderer.removeEventListener("afterRender", onAfterRender);
2596
+ this.renderer.removeEventListener("beforeRender", onBeforeRender);
2597
+ };
2598
+ };
2599
+
2600
+
2601
+ this.$resetCursorStyle = function() {
2602
+ var style = this.$cursorStyle || "ace";
2603
+ var cursorLayer = this.renderer.$cursorLayer;
2604
+ if (!cursorLayer)
2605
+ return;
2606
+ cursorLayer.setSmoothBlinking(/smooth/.test(style));
2607
+ cursorLayer.isBlinking = !this.$readOnly && style != "wide";
2608
+ dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style));
2609
+ };
2610
+
2611
+ }).call(Editor.prototype);
2612
+
2613
+
2614
+
2615
+ config.defineOptions(Editor.prototype, "editor", {
2616
+ selectionStyle: {
2617
+ set: function(style) {
2618
+ this.onSelectionChange();
2619
+ this._signal("changeSelectionStyle", {data: style});
2620
+ },
2621
+ initialValue: "line"
2622
+ },
2623
+ highlightActiveLine: {
2624
+ set: function() {this.$updateHighlightActiveLine();},
2625
+ initialValue: true
2626
+ },
2627
+ highlightSelectedWord: {
2628
+ set: function(shouldHighlight) {this.$onSelectionChange();},
2629
+ initialValue: true
2630
+ },
2631
+ readOnly: {
2632
+ set: function(readOnly) {
2633
+ // disabled to not break vim mode!
2634
+ // this.textInput.setReadOnly(readOnly);
2635
+ this.$resetCursorStyle();
2636
+ },
2637
+ initialValue: false
2638
+ },
2639
+ cursorStyle: {
2640
+ set: function(val) { this.$resetCursorStyle(); },
2641
+ values: ["ace", "slim", "smooth", "wide"],
2642
+ initialValue: "ace"
2643
+ },
2644
+ mergeUndoDeltas: {
2645
+ values: [false, true, "always"],
2646
+ initialValue: true
2647
+ },
2648
+ behavioursEnabled: {initialValue: true},
2649
+ wrapBehavioursEnabled: {initialValue: true},
2650
+ autoScrollEditorIntoView: {
2651
+ set: function(val) {this.setAutoScrollEditorIntoView(val)}
2652
+ },
2653
+
2654
+ hScrollBarAlwaysVisible: "renderer",
2655
+ vScrollBarAlwaysVisible: "renderer",
2656
+ highlightGutterLine: "renderer",
2657
+ animatedScroll: "renderer",
2658
+ showInvisibles: "renderer",
2659
+ showPrintMargin: "renderer",
2660
+ printMarginColumn: "renderer",
2661
+ printMargin: "renderer",
2662
+ fadeFoldWidgets: "renderer",
2663
+ showFoldWidgets: "renderer",
2664
+ showLineNumbers: "renderer",
2665
+ showGutter: "renderer",
2666
+ displayIndentGuides: "renderer",
2667
+ fontSize: "renderer",
2668
+ fontFamily: "renderer",
2669
+ maxLines: "renderer",
2670
+ minLines: "renderer",
2671
+ scrollPastEnd: "renderer",
2672
+ fixedWidthGutter: "renderer",
2673
+ theme: "renderer",
2674
+
2675
+ scrollSpeed: "$mouseHandler",
2676
+ dragDelay: "$mouseHandler",
2677
+ dragEnabled: "$mouseHandler",
2678
+ focusTimout: "$mouseHandler",
2679
+ tooltipFollowsMouse: "$mouseHandler",
2680
+
2681
+ firstLineNumber: "session",
2682
+ overwrite: "session",
2683
+ newLineMode: "session",
2684
+ useWorker: "session",
2685
+ useSoftTabs: "session",
2686
+ tabSize: "session",
2687
+ wrap: "session",
2688
+ foldStyle: "session",
2689
+ mode: "session"
2690
+ });
2691
+
2692
+ exports.Editor = Editor;
2693
+ });