gollum 3.1.2 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of gollum might be problematic. Click here for more details.
- checksums.yaml +13 -5
- data/README.md +4 -5
- data/gollum.gemspec +560 -28
- data/lib/gollum.rb +1 -1
- data/lib/gollum/app.rb +16 -10
- data/lib/gollum/public/gollum/javascript/editor/gollum.editor.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ace.js +33 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/anchor.js +77 -80
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/anchor_test.js +46 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/autocomplete.js +497 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/autocomplete/popup.js +341 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/autocomplete/text_completer.js +78 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/autocomplete/util.js +74 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer.js +28 -32
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer_test.js +5 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager.js +17 -20
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager_test.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/default_commands.js +312 -58
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/incremental_search_commands.js +232 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/multi_select_commands.js +17 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/occur_commands.js +110 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/config.js +70 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/config_test.js +67 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/css/editor.css +123 -69
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/document.js +118 -71
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session.js +507 -392
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session/bracket_match.js +4 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold.js +37 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold_line.js +30 -29
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session/folding.js +210 -102
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session_test.js +82 -8
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/editor.js +1006 -465
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/editor_highlight_selected_word_test.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/editor_text_edit_test.js +36 -34
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/beautify.js +57 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/beautify/php_rules.js +366 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/chromevox.js +980 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/elastic_tabstops_lite.js +319 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/emmet.js +434 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/error_marker.js +214 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/keybinding_menu.js +86 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/language_tools.js +226 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/linking.js +78 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/add_editor_menu_options.js +109 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/element_generator.js +148 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/generate_settings_menu.js +264 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/get_editor_keyboard_shortcuts.js +91 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/get_set_functions.js +141 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/overlay_page.js +116 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/settings_menu.css +48 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/modelist.js +195 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/old_ie.js +114 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/old_ie_test.js +77 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/searchbox.css +153 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/searchbox.js +308 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/settings_menu.js +76 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/spellcheck.js +69 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/{keyboard/vim/registers.js → ext/split.js} +8 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/static.css +18 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight.js +128 -26
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight_test.js +56 -36
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/statusbar.js +48 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/textarea.js +112 -117
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/themelist.js +100 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/whitespace.js +213 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/whitespace_test.js +116 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/incremental_search.js +317 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/incremental_search_test.js +213 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/emacs.js +369 -92
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/emacs_test.js +151 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/hash_handler.js +109 -41
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/keybinding.js +35 -24
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/keybinding_test.js +69 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/state_handler.js +1 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/textarea.js +82 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/textinput.js +337 -208
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim.js +5987 -120
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim_test.js +3866 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/cursor.js +48 -25
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/font_metrics.js +176 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/gutter.js +110 -44
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/marker.js +29 -14
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/text.js +69 -150
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/text_test.js +11 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/app_config.js +157 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/dom.js +33 -31
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/es5-shim.js +284 -304
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/event.js +147 -95
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/event_emitter.js +64 -23
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/keys.js +35 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/lang.js +30 -13
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/net.js +21 -39
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/oop.js +12 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/useragent.js +8 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/line_widgets.js +297 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/Readme.md +9 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/highlight_rules_test.js +210 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_asciidoc.txt +111 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_coffee.txt +57 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_curly.txt +9 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_html.txt +10 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_javascript.txt +34 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_livescript.txt +1 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_lucene.txt +16 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_markdown.txt +22 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt +24 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_ruby.txt +34 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_xml.txt +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_abap.json +189 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_abc.json +2207 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_actionscript.json +263 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ada.json +39 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_asciidoc.json +422 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_assembly_x86.json +114 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_autohotkey.json +261 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_batchfile.json +70 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c9search.json +131 -175
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c_cpp.json +190 -124
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_cirru.json +267 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_clojure.json +162 -248
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_cobol.json +4 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coffee.json +545 -188
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coldfusion.json +26 -41
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_csharp.json +31 -42
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_css.json +148 -231
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_curly.json +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_d.json +111 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_dart.json +368 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_diff.json +262 -732
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_dot.json +2254 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_eiffel.json +141 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ejs.json +296 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_elixir.json +196 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_elm.json +198 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_erlang.json +166 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_forth.json +219 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ftl.json +341 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_gcode.json +296 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_gherkin.json +142 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_gitignore.json +33 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_glsl.json +127 -185
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_golang.json +256 -362
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_groovy.json +410 -529
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haml.json +174 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_handlebars.json +81 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haskell.json +156 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haxe.json +143 -195
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_html.json +63 -150
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_html_ruby.json +257 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ini.json +23 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_io.json +49 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jack.json +1786 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jade.json +188 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_java.json +95 -139
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_javascript.json +593 -555
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_json.json +412 -611
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsoniq.json +4 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsp.json +435 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsx.json +51 -79
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_julia.json +111 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_latex.json +127 -196
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_less.json +204 -292
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_liquid.json +551 -698
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lisp.json +248 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_livescript.json +6 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_logiql.json +190 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lsl.json +503 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lua.json +348 -451
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_luapage.json +633 -824
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lucene.json +92 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_markdown.json +114 -1202
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_mask.json +302 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_matlab.json +90 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_mel.json +257 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_mushcode.json +790 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_mysql.json +4 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_nix.json +360 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_objectivec.json +793 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ocaml.json +200 -260
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_pascal.json +297 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_perl.json +227 -311
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_pgsql.json +889 -1020
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_php.json +171 -238
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_powershell.json +184 -255
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_prolog.json +245 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_properties.json +68 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_protobuf.json +136 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_python.json +152 -205
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_r.json +235 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_rdoc.json +441 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_rhtml.json +106 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ruby.json +242 -104
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_rust.json +136 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sass.json +229 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scad.json +194 -267
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scala.json +542 -748
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scheme.json +216 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scss.json +123 -181
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sh.json +334 -434
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sjs.json +276 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_smarty.json +98 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_snippets.json +159 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_soy_template.json +286 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_space.json +322 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sql.json +54 -73
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_stylus.json +271 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_svg.json +684 -931
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_tcl.json +385 -536
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_tex.json +130 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_text.json +29 -58
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_textile.json +113 -195
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_toml.json +131 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_twig.json +288 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_typescript.json +559 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_vala.json +158 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_vbscript.json +205 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_velocity.json +285 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_verilog.json +113 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_vhdl.json +271 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xml.json +43 -705
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xquery.json +44 -64
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_yaml.json +150 -260
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/abap.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/abap_highlight_rules.js +7 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/abc.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/abc_highlight_rules.js +114 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/actionscript.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/actionscript_highlight_rules.js +141 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ada.js +54 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ada_highlight_rules.js +93 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/apache_conf.js +62 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/apache_conf_highlight_rules.js +231 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/applescript.js +55 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/applescript_highlight_rules.js +139 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/asciidoc.js +3 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/asciidoc_highlight_rules.js +11 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/assembly_x86.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/assembly_x86_highlight_rules.js +114 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/autohotkey.js +57 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/autohotkey_highlight_rules.js +107 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/batchfile.js +61 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/batchfile_highlight_rules.js +97 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/behaviour_test.js +139 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/css.js +108 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/cstyle.js +164 -137
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/html.js +4 -48
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xml.js +141 -44
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xquery.js +76 -52
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/c9search.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/c9search_highlight_rules.js +127 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp.js +7 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp_highlight_rules.js +60 -51
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/cirru.js +51 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/cirru_highlight_rules.js +125 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/clojure.js +62 -46
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/clojure_highlight_rules.js +4 -21
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/cobol.js +53 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/cobol_highlight_rules.js +100 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee.js +28 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/coffee-script.js +13 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/helpers.js +160 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/lexer.js +228 -108
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/nodes.js +778 -670
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser.js +377 -347
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser_test.js +33 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/rewriter.js +275 -135
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/scope.js +5 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules.js +72 -167
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_worker.js +12 -24
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion.js +11 -14
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_highlight_rules.js +5 -84
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_test.js +3 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/csharp.js +7 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/csharp_highlight_rules.js +13 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css.js +7 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css/csslint.js +2325 -1216
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules.js +72 -102
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css_test.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker.js +11 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/curly.js +63 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/curly_highlight_rules.js +66 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/d.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/d_highlight_rules.js +334 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dart.js +8 -8
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dart_highlight_rules.js +70 -76
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/diff.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/diff_highlight_rules.js +24 -18
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/django.js +119 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/doc_comment_highlight_rules.js +12 -19
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dockerfile.js +52 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dockerfile_highlight_rules.js +57 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dot.js +55 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dot_highlight_rules.js +126 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/eiffel.js +52 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/eiffel_highlight_rules.js +136 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ejs.js +109 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/elixir.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/elixir_highlight_rules.js +433 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/elm.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/elm_highlight_rules.js +162 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/erlang.js +57 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/erlang_highlight_rules.js +876 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/c9search.js +12 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/csharp.js +137 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle.js +118 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle_test.js +24 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/fold_mode.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html.js +2 -33
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html_test.js +30 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/ini.js +80 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/latex.js +9 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/lua.js +4 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/mixed.js +2 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/velocity.js +120 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/xml.js +110 -87
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/forth.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/forth_highlight_rules.js +164 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ftl.js +49 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ftl_highlight_rules.js +195 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gcode.js +51 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gcode_highlight_rules.js +94 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gherkin.js +80 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gherkin_highlight_rules.js +113 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gitignore.js +20 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gitignore_highlight_rules.js +31 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/glsl.js +6 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/golang.js +42 -67
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/golang_highlight_rules.js +25 -39
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/groovy.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/groovy_highlight_rules.js +0 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haml.js +5 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haml_highlight_rules.js +43 -43
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/handlebars.js +29 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/handlebars_highlight_rules.js +72 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haskell.js +62 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haskell_highlight_rules.js +246 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haxe.js +7 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haxe_highlight_rules.js +0 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html.js +42 -12
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html/saxparser.js +10430 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_completions.js +305 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules.js +43 -85
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_ruby.js +59 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_ruby_highlight_rules.js +84 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_test.js +3 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/{lib/browser_focus.js → mode/html_worker.js} +48 -51
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ini.js +53 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ini_highlight_rules.js +112 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/io.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/io_highlight_rules.js +120 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jack.js +79 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jack_highlight_rules.js +142 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jade.js +4 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jade_highlight_rules.js +94 -100
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/java.js +2 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/java_highlight_rules.js +0 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript.js +15 -40
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript/jshint.js +10824 -4816
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules.js +113 -97
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_test.js +61 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker.js +5 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker_test.js +11 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/js_regex_highlight_rules.js +94 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json.js +5 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json_highlight_rules.js +3 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker.js +6 -35
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker_test.js +12 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsoniq.js +203 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsp.js +2 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsp_highlight_rules.js +36 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsx.js +26 -23
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsx_highlight_rules.js +113 -115
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/julia.js +62 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/julia_highlight_rules.js +170 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex.js +5 -37
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js +44 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/less.js +8 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/less_highlight_rules.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/liquid.js +4 -31
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules.js +15 -89
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lisp.js +5 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lisp_highlight_rules.js +25 -28
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/livescript.js +246 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/logiql.js +139 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/logiql_highlight_rules.js +119 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/logiql_test.js +98 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lsl.js +92 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lsl_highlight_rules.js +123 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lua.js +27 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lua/luaparse.js +1989 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lua_highlight_rules.js +55 -272
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lua_worker.js +70 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/luapage.js +6 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/luapage_highlight_rules.js +21 -14
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lucene.js +5 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/makefile.js +6 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/makefile_highlight_rules.js +22 -22
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/markdown.js +12 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules.js +130 -89
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mask.js +84 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mask_highlight_rules.js +309 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/matching_brace_outdent.js +1 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/matlab.js +55 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/matlab_highlight_rules.js +262 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mel.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mel_highlight_rules.js +133 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mushcode.js +116 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mushcode_highlight_rules.js +569 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mysql.js +51 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mysql_highlight_rules.js +122 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/nix.js +62 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/nix_highlight_rules.js +119 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/objectivec.js +4 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/objectivec_highlight_rules.js +137 -149
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml.js +4 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml_highlight_rules.js +0 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/pascal.js +67 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/pascal_highlight_rules.js +127 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/perl.js +10 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/perl_highlight_rules.js +17 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql.js +23 -51
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql_highlight_rules.js +334 -302
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php.js +59 -38
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php/php.js +5031 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php_highlight_rules.js +72 -52
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php_test.js +65 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php_worker.js +77 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/plain_text.js +55 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/{keyboard/vim/maps/aliases.js → mode/plain_text_test.js} +21 -59
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/powershell.js +7 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/powershell_highlight_rules.js +0 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/{xquery/JSONParseTreeHandler.js → praat.js} +45 -53
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/praat_highlight_rules.js +262 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/prolog.js +62 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/prolog_highlight_rules.js +238 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/properties.js +48 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/properties_highlight_rules.js +86 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/protobuf.js +63 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/protobuf_highlight_rules.js +66 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/python.js +5 -31
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/python_highlight_rules.js +50 -24
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/r.js +37 -18
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/r_highlight_rules.js +29 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rdoc.js +36 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rdoc_highlight_rules.js +27 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rhtml.js +31 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rhtml_highlight_rules.js +31 -14
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ruby.js +26 -36
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules.js +153 -33
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/{css_highlight_rules_test.js → ruby_test.js} +24 -39
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rust.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rust_highlight_rules.js +158 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sass.js +52 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sass_highlight_rules.js +79 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scad.js +5 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scad_highlight_rules.js +0 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scala.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scala_highlight_rules.js +1 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scheme.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scheme_highlight_rules.js +123 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scss.js +9 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scss_highlight_rules.js +7 -8
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sh.js +10 -31
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sh_highlight_rules.js +85 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sjs.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sjs_highlight_rules.js +233 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/smarty.js +51 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/smarty_highlight_rules.js +139 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/snippets.js +113 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/soy_template.js +60 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/soy_template_highlight_rules.js +356 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/space.js +21 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/space_highlight_rules.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sql.js +3 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sql_highlight_rules.js +6 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/stylus.js +5 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/stylus_highlight_rules.js +32 -42
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/svg.js +3 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/svg_highlight_rules.js +3 -18
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/tcl.js +4 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/tcl_highlight_rules.js +5 -13
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/tex.js +30 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/tex_highlight_rules.js +27 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/text.js +266 -29
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/text_highlight_rules.js +129 -15
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/text_test.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/textile.js +3 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/toml.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/toml_highlight_rules.js +103 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/twig.js +81 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/twig_highlight_rules.js +166 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/typescript.js +2 -8
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/typescript_highlight_rules.js +16 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vala.js +105 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vala_highlight_rules.js +457 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vbscript.js +60 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vbscript_highlight_rules.js +246 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/velocity.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/velocity_highlight_rules.js +177 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/verilog.js +54 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/verilog_highlight_rules.js +101 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vhdl.js +52 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vhdl_highlight_rules.js +115 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml.js +25 -8
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml/dom-parser.js +260 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml/dom.js +1138 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml/sax.js +592 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules.js +185 -45
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_test.js +3 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_worker.js +92 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery.js +107 -88
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/Readme.md +1 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/jsoniq_lexer.js +4453 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/xqlint.js +78911 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/xquery_lexer.js +4422 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_worker.js +66 -29
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/yaml.js +5 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/yaml_highlight_rules.js +2 -13
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/default_gutter_handler.js +50 -28
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/default_handlers.js +70 -137
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/dragdrop_handler.js +428 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/fold_handler.js +6 -23
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_event.js +6 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_handler.js +83 -39
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/{mode/liquid_highlight_rules_test.js → mouse/mouse_handler_test.js} +27 -34
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/multi_select_handler.js +94 -38
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/multi_select.js +192 -115
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/multi_select_test.js +124 -18
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/occur.js +193 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/occur_test.js +154 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/placeholder.js +9 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/placeholder_test.js +2 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/range.js +81 -102
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/range_list.js +38 -21
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/range_list_test.js +20 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/range_test.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/renderloop.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/requirejs/text.js +9 -8
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/requirejs/text_build.js +60 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/scrollbar.js +163 -32
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/search.js +38 -19
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/search_highlight.js +1 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/search_test.js +33 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/selection.js +167 -83
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/selection_test.js +22 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets.js +949 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/_.snippets +240 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/_all_modes.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/_all_modes.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/abap.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/abap.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/abc.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/abc.snippets +31 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/actionscript.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/actionscript.snippets +157 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ada.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ada.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/all_modes.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/all_modes.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/apache.snippets +35 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/apache_conf.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/apache_conf.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/applescript.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/applescript.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/asciidoc.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/asciidoc.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/assembly_x86.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/assembly_x86.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/autohotkey.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/autohotkey.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/autoit.snippets +66 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/batchfile.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/batchfile.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c.snippets +235 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c9search.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c9search.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c_cpp.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c_cpp.snippets +131 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/chef.snippets +204 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cirru.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cirru.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/clojure.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/clojure.snippets +90 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cmake.snippets +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cobol.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cobol.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/coffee.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/coffee.snippets +95 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/coldfusion.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/coldfusion.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cs.snippets +374 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/csharp.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/csharp.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/css.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/css.snippets +967 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/curly.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/curly.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/d.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/d.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dart.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dart.snippets +83 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/diff.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/diff.snippets +11 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/django.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/django.snippets +108 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dockerfile.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dockerfile.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dot.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dot.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dummy.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dummy_syntax.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/eiffel.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/eiffel.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ejs.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ejs.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/elixir.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/elixir.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/elm.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/elm.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/erlang.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/erlang.snippets +160 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/eruby.snippets +113 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/falcon.snippets +71 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/forth.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/forth.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ftl.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ftl.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gcode.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gcode.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gherkin.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gherkin.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gitignore.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gitignore.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/glsl.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/glsl.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/go.snippets +201 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/golang.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/golang.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/groovy.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/groovy.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haml.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haml.snippets +20 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/handlebars.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/handlebars.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haskell.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haskell.snippets +82 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haxe.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haxe.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/html.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/html.snippets +828 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/html_ruby.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/html_ruby.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/htmldjango.snippets +136 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/htmltornado.snippets +55 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ini.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ini.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/io.js +69 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/io.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jack.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jack.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jade.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jade.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/java.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/java.snippets +240 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/javascript-jquery.snippets +589 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/javascript.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/javascript.snippets +195 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/json.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/json.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsoniq.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsoniq.snippets +61 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsp.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsp.snippets +99 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsx.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsx.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/julia.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/julia.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/latex.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/latex.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ledger.snippets +5 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/less.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/less.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/liquid.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/liquid.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lisp.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lisp.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/livescript.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/livescript.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/logiql.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/logiql.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lsl.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lsl.snippets +1066 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lua.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lua.snippets +21 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/luapage.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/luapage.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lucene.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lucene.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/makefile.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/makefile.snippets +4 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mako.snippets +54 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/markdown.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/markdown.snippets +88 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/matlab.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/matlab.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mel.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mel.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mushcode.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mushcode.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mushcode_high_rules.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mushcode_high_rules.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mysql.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mysql.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/nix.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/nix.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/objc.snippets +247 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/objectivec.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/objectivec.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ocaml.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ocaml.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/pascal.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/pascal.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/perl.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/perl.snippets +347 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/pgsql.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/pgsql.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/php.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/php.snippets +377 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/plain_text.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/plain_text.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/powershell.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/powershell.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/praat.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/praat.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/prolog.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/prolog.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/properties.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/properties.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/protobuf.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/protobuf.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/python.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/python.snippets +158 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/r.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/r.snippets +121 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rdoc.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rdoc.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rhtml.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rhtml.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rst.snippets +22 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ruby.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ruby.snippets +928 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rust.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rust.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sass.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sass.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scad.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scad.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scala.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scala.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scheme.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scheme.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scss.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scss.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sh.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sh.snippets +83 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sjs.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sjs.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/smarty.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/smarty.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/snippets.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/snippets.snippets +9 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/soy_template.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/soy_template.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/space.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/space.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sql.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sql.snippets +26 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/stylus.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/stylus.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/svg.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/svg.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tcl.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tcl.snippets +92 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tex.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tex.snippets +191 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/text.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/text.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/textile.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/textile.snippets +30 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tmsnippet.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/toml.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/toml.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/twig.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/twig.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/typescript.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/typescript.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vala.js +195 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vala.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vbscript.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vbscript.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/velocity.js +8 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/velocity.snippets +28 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/verilog.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/verilog.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vhdl.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vhdl.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xml.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xml.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xquery.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xquery.snippets +61 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xslt.snippets +97 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/yaml.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/yaml.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets_test.js +131 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/split.js +3 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/all_browser.js +20 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/asyncjs/assert.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/mockrenderer.js +8 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/ambiance.css +6 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/chaos.css +154 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/chaos.js +33 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/chrome.css +5 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.css +3 -15
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.css +4 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.css +16 -26
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.css +2 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.css +10 -20
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.css +9 -12
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/eclipse.css +16 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/github.css +3 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.css +5 -17
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/katzenmilch.css +140 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/katzenmilch.js +39 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.css +9 -20
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/kuroir.css +67 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/kuroir.js +39 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.css +4 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.css +4 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.css +5 -17
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.css +14 -20
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.css +4 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.css +8 -20
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.css +6 -18
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/terminal.css +132 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/terminal.js +39 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/textmate.css +5 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.css +4 -15
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.css +5 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.css +6 -17
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.css +21 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.css +10 -17
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.css +6 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.css +4 -12
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/xcode.css +4 -12
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/xcode.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/token_iterator.js +4 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/tokenizer.js +246 -78
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/tokenizer_dev.js +71 -93
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/tokenizer_test.js +97 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/tooltip.js +138 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/undomanager.js +63 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/virtual_renderer.js +788 -403
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/mirror.js +9 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/worker.js +92 -55
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/worker_client.js +90 -52
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/worker_test.js +125 -0
- data/lib/gollum/public/gollum/livepreview/js/livepreview.js +18 -12
- data/lib/gollum/public/gollum/livepreview/readme.md +1 -1
- data/lib/gollum/templates/layout.mustache +1 -1
- data/lib/gollum/{public/gollum/livepreview/index.html → templates/livepreview.mustache} +23 -1
- data/lib/gollum/views/livepreview.rb +13 -0
- metadata +569 -37
- data/lib/gollum/editing_auth.rb +0 -34
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/commands.js +0 -561
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/motions.js +0 -593
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/operators.js +0 -196
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/util.js +0 -134
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/test_highlight_rules.js +0 -144
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules_test.js +0 -266
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules_test.js +0 -186
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules_test.js +0 -218
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lucene_highlight_rules_test.js +0 -99
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules_test.js +0 -100
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules_test.js +0 -108
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules_test.js +0 -208
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_util.js +0 -112
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQueryParser.js +0 -32982
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/visitors/SyntaxHighlighter.js +0 -316
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_highlight_rules.js +0 -145
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/dragdrop.js +0 -98
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/worker_sourcemint.js +0 -73
@@ -52,28 +52,39 @@ var UndoManager = function() {
|
|
52
52
|
(function() {
|
53
53
|
|
54
54
|
/**
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
55
|
+
* Provides a means for implementing your own undo manager. `options` has one property, `args`, an [[Array `Array`]], with two elements:
|
56
|
+
*
|
57
|
+
* - `args[0]` is an array of deltas
|
58
|
+
* - `args[1]` is the document to associate with
|
59
|
+
*
|
60
|
+
* @param {Object} options Contains additional properties
|
61
|
+
*
|
62
|
+
**/
|
63
63
|
this.execute = function(options) {
|
64
64
|
var deltas = options.args[0];
|
65
65
|
this.$doc = options.args[1];
|
66
|
+
if (options.merge && this.hasUndo()){
|
67
|
+
this.dirtyCounter--;
|
68
|
+
deltas = this.$undoStack.pop().concat(deltas);
|
69
|
+
}
|
66
70
|
this.$undoStack.push(deltas);
|
67
71
|
this.$redoStack = [];
|
72
|
+
|
73
|
+
if (this.dirtyCounter < 0) {
|
74
|
+
// The user has made a change after undoing past the last clean state.
|
75
|
+
// We can never get back to a clean state now until markClean() is called.
|
76
|
+
this.dirtyCounter = NaN;
|
77
|
+
}
|
78
|
+
this.dirtyCounter++;
|
68
79
|
};
|
69
80
|
|
70
81
|
/**
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
82
|
+
* [Perform an undo operation on the document, reverting the last change.]{: #UndoManager.undo}
|
83
|
+
* @param {Boolean} dontSelect {:dontSelect}
|
84
|
+
*
|
85
|
+
*
|
86
|
+
* @returns {Range} The range of the undo.
|
87
|
+
**/
|
77
88
|
this.undo = function(dontSelect) {
|
78
89
|
var deltas = this.$undoStack.pop();
|
79
90
|
var undoSelectionRange = null;
|
@@ -81,16 +92,18 @@ var UndoManager = function() {
|
|
81
92
|
undoSelectionRange =
|
82
93
|
this.$doc.undoChanges(deltas, dontSelect);
|
83
94
|
this.$redoStack.push(deltas);
|
95
|
+
this.dirtyCounter--;
|
84
96
|
}
|
97
|
+
|
85
98
|
return undoSelectionRange;
|
86
99
|
};
|
87
100
|
|
88
101
|
/**
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
102
|
+
* [Perform a redo operation on the document, reimplementing the last change.]{: #UndoManager.redo}
|
103
|
+
* @param {Boolean} dontSelect {:dontSelect}
|
104
|
+
*
|
105
|
+
*
|
106
|
+
**/
|
94
107
|
this.redo = function(dontSelect) {
|
95
108
|
var deltas = this.$redoStack.pop();
|
96
109
|
var redoSelectionRange = null;
|
@@ -98,37 +111,57 @@ var UndoManager = function() {
|
|
98
111
|
redoSelectionRange =
|
99
112
|
this.$doc.redoChanges(deltas, dontSelect);
|
100
113
|
this.$undoStack.push(deltas);
|
114
|
+
this.dirtyCounter++;
|
101
115
|
}
|
116
|
+
|
102
117
|
return redoSelectionRange;
|
103
118
|
};
|
104
119
|
|
105
120
|
/**
|
106
|
-
|
107
|
-
|
108
|
-
|
121
|
+
*
|
122
|
+
* Destroys the stack of undo and redo redo operations.
|
123
|
+
**/
|
109
124
|
this.reset = function() {
|
110
125
|
this.$undoStack = [];
|
111
126
|
this.$redoStack = [];
|
127
|
+
this.dirtyCounter = 0;
|
112
128
|
};
|
113
129
|
|
114
130
|
/**
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
131
|
+
*
|
132
|
+
* Returns `true` if there are undo operations left to perform.
|
133
|
+
* @returns {Boolean}
|
134
|
+
**/
|
119
135
|
this.hasUndo = function() {
|
120
136
|
return this.$undoStack.length > 0;
|
121
137
|
};
|
122
138
|
|
123
139
|
/**
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
140
|
+
*
|
141
|
+
* Returns `true` if there are redo operations left to perform.
|
142
|
+
* @returns {Boolean}
|
143
|
+
**/
|
128
144
|
this.hasRedo = function() {
|
129
145
|
return this.$redoStack.length > 0;
|
130
146
|
};
|
131
147
|
|
148
|
+
/**
|
149
|
+
*
|
150
|
+
* Marks the current status clean
|
151
|
+
**/
|
152
|
+
this.markClean = function() {
|
153
|
+
this.dirtyCounter = 0;
|
154
|
+
};
|
155
|
+
|
156
|
+
/**
|
157
|
+
*
|
158
|
+
* Returns if the current status is clean
|
159
|
+
* @returns {Boolean}
|
160
|
+
**/
|
161
|
+
this.isClean = function() {
|
162
|
+
return this.dirtyCounter === 0;
|
163
|
+
};
|
164
|
+
|
132
165
|
}).call(UndoManager.prototype);
|
133
166
|
|
134
167
|
exports.UndoManager = UndoManager;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
*
|
4
4
|
* Copyright (c) 2010, Ajax.org B.V.
|
5
5
|
* All rights reserved.
|
6
|
-
*
|
6
|
+
*
|
7
7
|
* Redistribution and use in source and binary forms, with or without
|
8
8
|
* modification, are permitted provided that the following conditions are met:
|
9
9
|
* * Redistributions of source code must retain the above copyright
|
@@ -14,7 +14,7 @@
|
|
14
14
|
* * Neither the name of Ajax.org B.V. nor the
|
15
15
|
* names of its contributors may be used to endorse or promote products
|
16
16
|
* derived from this software without specific prior written permission.
|
17
|
-
*
|
17
|
+
*
|
18
18
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19
19
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20
20
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
@@ -33,25 +33,24 @@ define(function(require, exports, module) {
|
|
33
33
|
|
34
34
|
var oop = require("./lib/oop");
|
35
35
|
var dom = require("./lib/dom");
|
36
|
-
var event = require("./lib/event");
|
37
|
-
var useragent = require("./lib/useragent");
|
38
36
|
var config = require("./config");
|
39
|
-
var
|
37
|
+
var useragent = require("./lib/useragent");
|
40
38
|
var GutterLayer = require("./layer/gutter").Gutter;
|
41
39
|
var MarkerLayer = require("./layer/marker").Marker;
|
42
40
|
var TextLayer = require("./layer/text").Text;
|
43
41
|
var CursorLayer = require("./layer/cursor").Cursor;
|
44
|
-
var
|
42
|
+
var HScrollBar = require("./scrollbar").HScrollBar;
|
43
|
+
var VScrollBar = require("./scrollbar").VScrollBar;
|
45
44
|
var RenderLoop = require("./renderloop").RenderLoop;
|
45
|
+
var FontMetrics = require("./layer/font_metrics").FontMetrics;
|
46
46
|
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
47
47
|
var editorCss = require("./requirejs/text!./css/editor.css");
|
48
48
|
|
49
49
|
dom.importCssString(editorCss, "ace_editor");
|
50
50
|
|
51
51
|
/**
|
52
|
-
*
|
53
|
-
*
|
54
52
|
* The class that is responsible for drawing everything you see on the screen!
|
53
|
+
* @related editor.renderer
|
55
54
|
* @class VirtualRenderer
|
56
55
|
**/
|
57
56
|
|
@@ -60,25 +59,22 @@ dom.importCssString(editorCss, "ace_editor");
|
|
60
59
|
* @param {DOMElement} container The root element of the editor
|
61
60
|
* @param {String} theme The starting theme
|
62
61
|
*
|
63
|
-
*
|
64
|
-
*
|
65
|
-
*
|
66
62
|
* @constructor
|
67
63
|
**/
|
68
64
|
|
69
65
|
var VirtualRenderer = function(container, theme) {
|
70
66
|
var _self = this;
|
71
67
|
|
72
|
-
this.container = container;
|
68
|
+
this.container = container || dom.createElement("div");
|
73
69
|
|
74
70
|
// TODO: this breaks rendering in Cloud9 with multiple ace instances
|
75
|
-
|
76
|
-
//
|
71
|
+
// // Imports CSS once per DOM document ('ace_editor' serves as an identifier).
|
72
|
+
// dom.importCssString(editorCss, "ace_editor", container.ownerDocument);
|
77
73
|
|
78
74
|
// in IE <= 9 the native cursor always shines through
|
79
|
-
this.$keepTextAreaAtCursor = !useragent.
|
75
|
+
this.$keepTextAreaAtCursor = !useragent.isOldIE;
|
80
76
|
|
81
|
-
dom.addCssClass(container, "ace_editor");
|
77
|
+
dom.addCssClass(this.container, "ace_editor");
|
82
78
|
|
83
79
|
this.setTheme(theme);
|
84
80
|
|
@@ -94,9 +90,8 @@ var VirtualRenderer = function(container, theme) {
|
|
94
90
|
this.content.className = "ace_content";
|
95
91
|
this.scroller.appendChild(this.content);
|
96
92
|
|
97
|
-
this.setHighlightGutterLine(true);
|
98
93
|
this.$gutterLayer = new GutterLayer(this.$gutter);
|
99
|
-
this.$gutterLayer.on("changeGutterWidth", this.
|
94
|
+
this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this));
|
100
95
|
|
101
96
|
this.$markerBack = new MarkerLayer(this.content);
|
102
97
|
|
@@ -109,40 +104,42 @@ var VirtualRenderer = function(container, theme) {
|
|
109
104
|
|
110
105
|
// Indicates whether the horizontal scrollbar is visible
|
111
106
|
this.$horizScroll = false;
|
112
|
-
this.$
|
113
|
-
|
114
|
-
this
|
115
|
-
|
116
|
-
this.
|
117
|
-
this.
|
118
|
-
if (!_self.$
|
119
|
-
_self.session.setScrollTop(e.data);
|
107
|
+
this.$vScroll = false;
|
108
|
+
|
109
|
+
this.scrollBar =
|
110
|
+
this.scrollBarV = new VScrollBar(this.container, this);
|
111
|
+
this.scrollBarH = new HScrollBar(this.container, this);
|
112
|
+
this.scrollBarV.addEventListener("scroll", function(e) {
|
113
|
+
if (!_self.$scrollAnimation)
|
114
|
+
_self.session.setScrollTop(e.data - _self.scrollMargin.top);
|
115
|
+
});
|
116
|
+
this.scrollBarH.addEventListener("scroll", function(e) {
|
117
|
+
if (!_self.$scrollAnimation)
|
118
|
+
_self.session.setScrollLeft(e.data - _self.scrollMargin.left);
|
120
119
|
});
|
121
120
|
|
122
121
|
this.scrollTop = 0;
|
123
122
|
this.scrollLeft = 0;
|
124
123
|
|
125
|
-
event.addListener(this.scroller, "scroll", function() {
|
126
|
-
var scrollLeft = _self.scroller.scrollLeft;
|
127
|
-
_self.scrollLeft = scrollLeft;
|
128
|
-
_self.session.setScrollLeft(scrollLeft);
|
129
|
-
});
|
130
|
-
|
131
124
|
this.cursorPos = {
|
132
125
|
row : 0,
|
133
126
|
column : 0
|
134
127
|
};
|
135
128
|
|
136
|
-
this.$
|
129
|
+
this.$fontMetrics = new FontMetrics(this.container, 500);
|
130
|
+
this.$textLayer.$setFontMetrics(this.$fontMetrics);
|
131
|
+
this.$textLayer.addEventListener("changeCharacterSize", function(e) {
|
137
132
|
_self.updateCharacterSize();
|
138
|
-
_self.onResize(true);
|
133
|
+
_self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);
|
134
|
+
_self._signal("changeCharacterSize", e);
|
139
135
|
});
|
140
136
|
|
141
137
|
this.$size = {
|
142
138
|
width: 0,
|
143
139
|
height: 0,
|
144
140
|
scrollerHeight: 0,
|
145
|
-
scrollerWidth: 0
|
141
|
+
scrollerWidth: 0,
|
142
|
+
$dirty: true
|
146
143
|
};
|
147
144
|
|
148
145
|
this.layerConfig = {
|
@@ -151,12 +148,22 @@ var VirtualRenderer = function(container, theme) {
|
|
151
148
|
firstRow : 0,
|
152
149
|
firstRowScreen: 0,
|
153
150
|
lastRow : 0,
|
154
|
-
lineHeight :
|
155
|
-
characterWidth :
|
151
|
+
lineHeight : 0,
|
152
|
+
characterWidth : 0,
|
156
153
|
minHeight : 1,
|
157
154
|
maxHeight : 1,
|
158
155
|
offset : 0,
|
159
|
-
height : 1
|
156
|
+
height : 1,
|
157
|
+
gutterOffset: 1
|
158
|
+
};
|
159
|
+
|
160
|
+
this.scrollMargin = {
|
161
|
+
left: 0,
|
162
|
+
right: 0,
|
163
|
+
top: 0,
|
164
|
+
bottom: 0,
|
165
|
+
v: 0,
|
166
|
+
h: 0
|
160
167
|
};
|
161
168
|
|
162
169
|
this.$loop = new RenderLoop(
|
@@ -167,10 +174,11 @@ var VirtualRenderer = function(container, theme) {
|
|
167
174
|
|
168
175
|
this.updateCharacterSize();
|
169
176
|
this.setPadding(4);
|
177
|
+
config.resetOptions(this);
|
178
|
+
config._emit("renderer", this);
|
170
179
|
};
|
171
180
|
|
172
181
|
(function() {
|
173
|
-
this.showGutter = true;
|
174
182
|
|
175
183
|
this.CHANGE_CURSOR = 1;
|
176
184
|
this.CHANGE_MARKER = 2;
|
@@ -184,35 +192,63 @@ var VirtualRenderer = function(container, theme) {
|
|
184
192
|
this.CHANGE_FULL = 512;
|
185
193
|
this.CHANGE_H_SCROLL = 1024;
|
186
194
|
|
195
|
+
// this.$logChanges = function(changes) {
|
196
|
+
// var a = ""
|
197
|
+
// if (changes & this.CHANGE_CURSOR) a += " cursor";
|
198
|
+
// if (changes & this.CHANGE_MARKER) a += " marker";
|
199
|
+
// if (changes & this.CHANGE_GUTTER) a += " gutter";
|
200
|
+
// if (changes & this.CHANGE_SCROLL) a += " scroll";
|
201
|
+
// if (changes & this.CHANGE_LINES) a += " lines";
|
202
|
+
// if (changes & this.CHANGE_TEXT) a += " text";
|
203
|
+
// if (changes & this.CHANGE_SIZE) a += " size";
|
204
|
+
// if (changes & this.CHANGE_MARKER_BACK) a += " marker_back";
|
205
|
+
// if (changes & this.CHANGE_MARKER_FRONT) a += " marker_front";
|
206
|
+
// if (changes & this.CHANGE_FULL) a += " full";
|
207
|
+
// if (changes & this.CHANGE_H_SCROLL) a += " h_scroll";
|
208
|
+
// console.log(a.trim())
|
209
|
+
// };
|
210
|
+
|
187
211
|
oop.implement(this, EventEmitter);
|
188
|
-
|
212
|
+
|
189
213
|
this.updateCharacterSize = function() {
|
190
214
|
if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) {
|
191
215
|
this.$allowBoldFonts = this.$textLayer.allowBoldFonts;
|
192
216
|
this.setStyle("ace_nobold", !this.$allowBoldFonts);
|
193
217
|
}
|
194
|
-
|
218
|
+
|
219
|
+
this.layerConfig.characterWidth =
|
195
220
|
this.characterWidth = this.$textLayer.getCharacterWidth();
|
221
|
+
this.layerConfig.lineHeight =
|
196
222
|
this.lineHeight = this.$textLayer.getLineHeight();
|
197
223
|
this.$updatePrintMargin();
|
198
224
|
};
|
199
225
|
|
200
226
|
/**
|
201
|
-
*
|
227
|
+
*
|
202
228
|
* Associates the renderer with an [[EditSession `EditSession`]].
|
203
229
|
**/
|
204
230
|
this.setSession = function(session) {
|
231
|
+
if (this.session)
|
232
|
+
this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode);
|
233
|
+
|
205
234
|
this.session = session;
|
206
|
-
|
207
|
-
|
208
|
-
|
235
|
+
if (session && this.scrollMargin.top && session.getScrollTop() <= 0)
|
236
|
+
session.setScrollTop(-this.scrollMargin.top);
|
237
|
+
|
209
238
|
this.$cursorLayer.setSession(session);
|
210
239
|
this.$markerBack.setSession(session);
|
211
240
|
this.$markerFront.setSession(session);
|
212
241
|
this.$gutterLayer.setSession(session);
|
213
242
|
this.$textLayer.setSession(session);
|
243
|
+
if (!session)
|
244
|
+
return;
|
245
|
+
|
214
246
|
this.$loop.schedule(this.CHANGE_FULL);
|
247
|
+
this.session.$setFontMetrics(this.$fontMetrics);
|
215
248
|
|
249
|
+
this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);
|
250
|
+
this.onChangeNewLineMode()
|
251
|
+
this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode);
|
216
252
|
};
|
217
253
|
|
218
254
|
/**
|
@@ -220,9 +256,9 @@ var VirtualRenderer = function(container, theme) {
|
|
220
256
|
* @param {Number} firstRow The first row to update
|
221
257
|
* @param {Number} lastRow The last row to update
|
222
258
|
*
|
223
|
-
*
|
259
|
+
*
|
224
260
|
**/
|
225
|
-
this.updateLines = function(firstRow, lastRow) {
|
261
|
+
this.updateLines = function(firstRow, lastRow, force) {
|
226
262
|
if (lastRow === undefined)
|
227
263
|
lastRow = Infinity;
|
228
264
|
|
@@ -240,9 +276,26 @@ var VirtualRenderer = function(container, theme) {
|
|
240
276
|
this.$changedLines.lastRow = lastRow;
|
241
277
|
}
|
242
278
|
|
279
|
+
// If the change happened offscreen above us then it's possible
|
280
|
+
// that a new line wrap will affect the position of the lines on our
|
281
|
+
// screen so they need redrawn.
|
282
|
+
// TODO: better solution is to not change scroll position when text is changed outside of visible area
|
283
|
+
if (this.$changedLines.lastRow < this.layerConfig.firstRow) {
|
284
|
+
if (force)
|
285
|
+
this.$changedLines.lastRow = this.layerConfig.lastRow;
|
286
|
+
else
|
287
|
+
return;
|
288
|
+
}
|
289
|
+
if (this.$changedLines.firstRow > this.layerConfig.lastRow)
|
290
|
+
return;
|
243
291
|
this.$loop.schedule(this.CHANGE_LINES);
|
244
292
|
};
|
245
293
|
|
294
|
+
this.onChangeNewLineMode = function() {
|
295
|
+
this.$loop.schedule(this.CHANGE_TEXT);
|
296
|
+
this.$textLayer.$updateEolChar();
|
297
|
+
};
|
298
|
+
|
246
299
|
this.onChangeTabSize = function() {
|
247
300
|
this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);
|
248
301
|
this.$textLayer.onChangeTabSize();
|
@@ -259,25 +312,30 @@ var VirtualRenderer = function(container, theme) {
|
|
259
312
|
* Triggers a full update of all the layers, for all the rows.
|
260
313
|
* @param {Boolean} force If `true`, forces the changes through
|
261
314
|
*
|
262
|
-
*
|
315
|
+
*
|
263
316
|
**/
|
264
317
|
this.updateFull = function(force) {
|
265
|
-
if (force)
|
318
|
+
if (force)
|
266
319
|
this.$renderChanges(this.CHANGE_FULL, true);
|
267
|
-
|
268
|
-
else {
|
320
|
+
else
|
269
321
|
this.$loop.schedule(this.CHANGE_FULL);
|
270
|
-
}
|
271
322
|
};
|
272
323
|
|
273
324
|
/**
|
274
|
-
*
|
325
|
+
*
|
275
326
|
* Updates the font size.
|
276
327
|
**/
|
277
328
|
this.updateFontSize = function() {
|
278
329
|
this.$textLayer.checkForSizeChanges();
|
279
330
|
};
|
280
331
|
|
332
|
+
this.$changes = 0;
|
333
|
+
this.$updateSizeAsync = function() {
|
334
|
+
if (this.$loop.pending)
|
335
|
+
this.$size.$dirty = true;
|
336
|
+
else
|
337
|
+
this.onResize();
|
338
|
+
};
|
281
339
|
/**
|
282
340
|
* [Triggers a resize of the editor.]{: #VirtualRenderer.onResize}
|
283
341
|
* @param {Boolean} force If `true`, recomputes the size, even if the height and width haven't changed
|
@@ -285,80 +343,132 @@ var VirtualRenderer = function(container, theme) {
|
|
285
343
|
* @param {Number} width The width of the editor in pixels
|
286
344
|
* @param {Number} height The hiehgt of the editor, in pixels
|
287
345
|
*
|
288
|
-
*
|
346
|
+
*
|
289
347
|
**/
|
290
348
|
this.onResize = function(force, gutterWidth, width, height) {
|
291
|
-
var changes = this.CHANGE_SIZE;
|
292
|
-
var size = this.$size;
|
293
|
-
|
294
349
|
if (this.resizing > 2)
|
295
350
|
return;
|
296
|
-
else if (this.resizing >
|
351
|
+
else if (this.resizing > 0)
|
297
352
|
this.resizing++;
|
298
353
|
else
|
299
354
|
this.resizing = force ? 1 : 0;
|
300
|
-
|
355
|
+
// `|| el.scrollHeight` is required for outosizing editors on ie
|
356
|
+
// where elements with clientHeight = 0 alsoe have clientWidth = 0
|
357
|
+
var el = this.container;
|
301
358
|
if (!height)
|
302
|
-
height =
|
303
|
-
if (
|
359
|
+
height = el.clientHeight || el.scrollHeight;
|
360
|
+
if (!width)
|
361
|
+
width = el.clientWidth || el.scrollWidth;
|
362
|
+
var changes = this.$updateCachedSize(force, gutterWidth, width, height);
|
363
|
+
|
364
|
+
|
365
|
+
if (!this.$size.scrollerHeight || (!width && !height))
|
366
|
+
return this.resizing = 0;
|
367
|
+
|
368
|
+
if (force)
|
369
|
+
this.$gutterLayer.$padding = null;
|
370
|
+
|
371
|
+
if (force)
|
372
|
+
this.$renderChanges(changes | this.$changes, true);
|
373
|
+
else
|
374
|
+
this.$loop.schedule(changes | this.$changes);
|
375
|
+
|
376
|
+
if (this.resizing)
|
377
|
+
this.resizing = 0;
|
378
|
+
// reset cached values on scrollbars, needs to be removed when switching to non-native scrollbars
|
379
|
+
// see https://github.com/ajaxorg/ace/issues/2195
|
380
|
+
this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null;
|
381
|
+
};
|
382
|
+
|
383
|
+
this.$updateCachedSize = function(force, gutterWidth, width, height) {
|
384
|
+
height -= (this.$extraHeight || 0);
|
385
|
+
var changes = 0;
|
386
|
+
var size = this.$size;
|
387
|
+
var oldSize = {
|
388
|
+
width: size.width,
|
389
|
+
height: size.height,
|
390
|
+
scrollerHeight: size.scrollerHeight,
|
391
|
+
scrollerWidth: size.scrollerWidth
|
392
|
+
};
|
393
|
+
if (height && (force || size.height != height)) {
|
304
394
|
size.height = height;
|
395
|
+
changes |= this.CHANGE_SIZE;
|
305
396
|
|
306
|
-
|
307
|
-
|
308
|
-
|
397
|
+
size.scrollerHeight = size.height;
|
398
|
+
if (this.$horizScroll)
|
399
|
+
size.scrollerHeight -= this.scrollBarH.getHeight();
|
400
|
+
|
401
|
+
// this.scrollBarV.setHeight(size.scrollerHeight);
|
402
|
+
this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px";
|
309
403
|
|
310
|
-
|
311
|
-
this.session.setScrollTop(this.getScrollTop());
|
312
|
-
changes = changes | this.CHANGE_FULL;
|
313
|
-
}
|
404
|
+
changes = changes | this.CHANGE_SCROLL;
|
314
405
|
}
|
315
406
|
|
316
|
-
if (
|
317
|
-
|
318
|
-
if (force || this.resizing > 1 || size.width != width) {
|
407
|
+
if (width && (force || size.width != width)) {
|
408
|
+
changes |= this.CHANGE_SIZE;
|
319
409
|
size.width = width;
|
320
|
-
|
321
|
-
|
410
|
+
|
411
|
+
if (gutterWidth == null)
|
412
|
+
gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
|
413
|
+
|
414
|
+
this.gutterWidth = gutterWidth;
|
415
|
+
|
416
|
+
this.scrollBarH.element.style.left =
|
322
417
|
this.scroller.style.left = gutterWidth + "px";
|
323
|
-
size.scrollerWidth = Math.max(0, width - gutterWidth - this.
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
418
|
+
size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth());
|
419
|
+
|
420
|
+
this.scrollBarH.element.style.right =
|
421
|
+
this.scroller.style.right = this.scrollBarV.getWidth() + "px";
|
422
|
+
this.scroller.style.bottom = this.scrollBarH.getHeight() + "px";
|
423
|
+
|
424
|
+
// this.scrollBarH.element.style.setWidth(size.scrollerWidth);
|
425
|
+
|
426
|
+
if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force)
|
427
|
+
changes |= this.CHANGE_FULL;
|
328
428
|
}
|
329
|
-
|
330
|
-
if (force)
|
331
|
-
this.$renderChanges(changes, true);
|
332
|
-
else
|
333
|
-
this.$loop.schedule(changes);
|
334
429
|
|
335
|
-
|
336
|
-
|
430
|
+
size.$dirty = !width || !height;
|
431
|
+
|
432
|
+
if (changes)
|
433
|
+
this._signal("resize", oldSize);
|
434
|
+
|
435
|
+
return changes;
|
436
|
+
};
|
437
|
+
|
438
|
+
this.onGutterResize = function() {
|
439
|
+
var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
|
440
|
+
if (gutterWidth != this.gutterWidth)
|
441
|
+
this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);
|
442
|
+
|
443
|
+
if (this.session.getUseWrapMode() && this.adjustWrapLimit()) {
|
444
|
+
this.$loop.schedule(this.CHANGE_FULL);
|
445
|
+
} else if (this.$size.$dirty) {
|
446
|
+
this.$loop.schedule(this.CHANGE_FULL);
|
447
|
+
} else {
|
448
|
+
this.$computeLayerConfig();
|
449
|
+
this.$loop.schedule(this.CHANGE_MARKER);
|
450
|
+
}
|
337
451
|
};
|
338
452
|
|
339
453
|
/**
|
340
|
-
*
|
341
454
|
* Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
|
342
455
|
**/
|
343
456
|
this.adjustWrapLimit = function() {
|
344
457
|
var availableWidth = this.$size.scrollerWidth - this.$padding * 2;
|
345
458
|
var limit = Math.floor(availableWidth / this.characterWidth);
|
346
|
-
return this.session.adjustWrapLimit(limit);
|
459
|
+
return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn);
|
347
460
|
};
|
348
461
|
|
349
462
|
/**
|
350
463
|
* Identifies whether you want to have an animated scroll or not.
|
351
464
|
* @param {Boolean} shouldAnimate Set to `true` to show animated scrolls
|
352
465
|
*
|
353
|
-
*
|
354
|
-
*
|
355
466
|
**/
|
356
467
|
this.setAnimatedScroll = function(shouldAnimate){
|
357
|
-
this
|
468
|
+
this.setOption("animatedScroll", shouldAnimate);
|
358
469
|
};
|
359
470
|
|
360
471
|
/**
|
361
|
-
*
|
362
472
|
* Returns whether an animated scroll happens or not.
|
363
473
|
* @returns {Boolean}
|
364
474
|
**/
|
@@ -370,44 +480,33 @@ var VirtualRenderer = function(container, theme) {
|
|
370
480
|
* Identifies whether you want to show invisible characters or not.
|
371
481
|
* @param {Boolean} showInvisibles Set to `true` to show invisibles
|
372
482
|
*
|
373
|
-
*
|
374
|
-
*
|
375
483
|
**/
|
376
484
|
this.setShowInvisibles = function(showInvisibles) {
|
377
|
-
|
378
|
-
this.$loop.schedule(this.CHANGE_TEXT);
|
485
|
+
this.setOption("showInvisibles", showInvisibles);
|
379
486
|
};
|
380
487
|
|
381
488
|
/**
|
382
|
-
*
|
383
489
|
* Returns whether invisible characters are being shown or not.
|
384
490
|
* @returns {Boolean}
|
385
491
|
**/
|
386
492
|
this.getShowInvisibles = function() {
|
387
|
-
return this
|
493
|
+
return this.getOption("showInvisibles");
|
388
494
|
};
|
389
|
-
|
390
495
|
this.getDisplayIndentGuides = function() {
|
391
|
-
return this
|
496
|
+
return this.getOption("displayIndentGuides");
|
392
497
|
};
|
393
|
-
|
498
|
+
|
394
499
|
this.setDisplayIndentGuides = function(display) {
|
395
|
-
|
396
|
-
this.$loop.schedule(this.CHANGE_TEXT);
|
500
|
+
this.setOption("displayIndentGuides", display);
|
397
501
|
};
|
398
|
-
|
399
|
-
this.$showPrintMargin = true;
|
400
502
|
|
401
503
|
/**
|
402
504
|
* Identifies whether you want to show the print margin or not.
|
403
505
|
* @param {Boolean} showPrintMargin Set to `true` to show the print margin
|
404
506
|
*
|
405
|
-
*
|
406
|
-
*
|
407
507
|
**/
|
408
508
|
this.setShowPrintMargin = function(showPrintMargin) {
|
409
|
-
this
|
410
|
-
this.$updatePrintMargin();
|
509
|
+
this.setOption("showPrintMargin", showPrintMargin);
|
411
510
|
};
|
412
511
|
|
413
512
|
/**
|
@@ -415,94 +514,71 @@ var VirtualRenderer = function(container, theme) {
|
|
415
514
|
* @returns {Boolean}
|
416
515
|
**/
|
417
516
|
this.getShowPrintMargin = function() {
|
418
|
-
return this
|
517
|
+
return this.getOption("showPrintMargin");
|
419
518
|
};
|
420
|
-
|
421
|
-
this.$printMarginColumn = 80;
|
422
|
-
|
423
519
|
/**
|
424
520
|
* Identifies whether you want to show the print margin column or not.
|
425
521
|
* @param {Boolean} showPrintMargin Set to `true` to show the print margin column
|
426
522
|
*
|
427
|
-
*
|
428
|
-
*
|
429
523
|
**/
|
430
524
|
this.setPrintMarginColumn = function(showPrintMargin) {
|
431
|
-
this
|
432
|
-
this.$updatePrintMargin();
|
525
|
+
this.setOption("printMarginColumn", showPrintMargin);
|
433
526
|
};
|
434
527
|
|
435
528
|
/**
|
436
|
-
*
|
437
529
|
* Returns whether the print margin column is being shown or not.
|
438
530
|
* @returns {Boolean}
|
439
531
|
**/
|
440
532
|
this.getPrintMarginColumn = function() {
|
441
|
-
return this
|
533
|
+
return this.getOption("printMarginColumn");
|
442
534
|
};
|
443
535
|
|
444
536
|
/**
|
445
|
-
*
|
446
537
|
* Returns `true` if the gutter is being shown.
|
447
538
|
* @returns {Boolean}
|
448
539
|
**/
|
449
540
|
this.getShowGutter = function(){
|
450
|
-
return this.showGutter;
|
541
|
+
return this.getOption("showGutter");
|
451
542
|
};
|
452
543
|
|
453
544
|
/**
|
454
545
|
* Identifies whether you want to show the gutter or not.
|
455
546
|
* @param {Boolean} show Set to `true` to show the gutter
|
456
547
|
*
|
457
|
-
*
|
458
548
|
**/
|
459
549
|
this.setShowGutter = function(show){
|
460
|
-
|
461
|
-
return;
|
462
|
-
this.$gutter.style.display = show ? "block" : "none";
|
463
|
-
this.showGutter = show;
|
464
|
-
this.onResize(true);
|
550
|
+
return this.setOption("showGutter", show);
|
465
551
|
};
|
466
552
|
|
467
553
|
this.getFadeFoldWidgets = function(){
|
468
|
-
return
|
554
|
+
return this.getOption("fadeFoldWidgets")
|
469
555
|
};
|
470
556
|
|
471
557
|
this.setFadeFoldWidgets = function(show) {
|
472
|
-
|
473
|
-
dom.addCssClass(this.$gutter, "ace_fade-fold-widgets");
|
474
|
-
else
|
475
|
-
dom.removeCssClass(this.$gutter, "ace_fade-fold-widgets");
|
558
|
+
this.setOption("fadeFoldWidgets", show);
|
476
559
|
};
|
477
560
|
|
478
|
-
this.$highlightGutterLine = false;
|
479
561
|
this.setHighlightGutterLine = function(shouldHighlight) {
|
480
|
-
|
481
|
-
return;
|
482
|
-
this.$highlightGutterLine = shouldHighlight;
|
483
|
-
|
484
|
-
if (!this.$gutterLineHighlight) {
|
485
|
-
this.$gutterLineHighlight = dom.createElement("div");
|
486
|
-
this.$gutterLineHighlight.className = "ace_gutter-active-line";
|
487
|
-
this.$gutter.appendChild(this.$gutterLineHighlight);
|
488
|
-
return;
|
489
|
-
}
|
490
|
-
|
491
|
-
this.$gutterLineHighlight.style.display = shouldHighlight ? "" : "none";
|
492
|
-
// if cursorlayer have never been updated there's nothing on screen to update
|
493
|
-
if (this.$cursorLayer.$pixelPos)
|
494
|
-
this.$updateGutterLineHighlight();
|
562
|
+
this.setOption("highlightGutterLine", shouldHighlight);
|
495
563
|
};
|
496
564
|
|
497
565
|
this.getHighlightGutterLine = function() {
|
498
|
-
return this
|
566
|
+
return this.getOption("highlightGutterLine");
|
499
567
|
};
|
500
568
|
|
501
569
|
this.$updateGutterLineHighlight = function() {
|
502
|
-
|
503
|
-
|
570
|
+
var pos = this.$cursorLayer.$pixelPos;
|
571
|
+
var height = this.layerConfig.lineHeight;
|
572
|
+
if (this.session.getUseWrapMode()) {
|
573
|
+
var cursor = this.session.selection.getCursor();
|
574
|
+
cursor.column = 0;
|
575
|
+
pos = this.$cursorLayer.getPixelPosition(cursor, true);
|
576
|
+
height *= this.session.getRowLength(cursor.row);
|
577
|
+
}
|
578
|
+
this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + "px";
|
579
|
+
this.$gutterLineHighlight.style.height = height + "px";
|
504
580
|
};
|
505
|
-
|
581
|
+
|
506
582
|
this.$updatePrintMargin = function() {
|
507
583
|
if (!this.$showPrintMargin && !this.$printMarginEl)
|
508
584
|
return;
|
@@ -519,10 +595,13 @@ var VirtualRenderer = function(container, theme) {
|
|
519
595
|
var style = this.$printMarginEl.style;
|
520
596
|
style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px";
|
521
597
|
style.visibility = this.$showPrintMargin ? "visible" : "hidden";
|
598
|
+
|
599
|
+
if (this.session && this.session.$wrap == -1)
|
600
|
+
this.adjustWrapLimit();
|
522
601
|
};
|
523
602
|
|
524
603
|
/**
|
525
|
-
*
|
604
|
+
*
|
526
605
|
* Returns the root element containing this renderer.
|
527
606
|
* @returns {DOMElement}
|
528
607
|
**/
|
@@ -531,7 +610,7 @@ var VirtualRenderer = function(container, theme) {
|
|
531
610
|
};
|
532
611
|
|
533
612
|
/**
|
534
|
-
*
|
613
|
+
*
|
535
614
|
* Returns the element that the mouse events are attached to
|
536
615
|
* @returns {DOMElement}
|
537
616
|
**/
|
@@ -540,7 +619,7 @@ var VirtualRenderer = function(container, theme) {
|
|
540
619
|
};
|
541
620
|
|
542
621
|
/**
|
543
|
-
*
|
622
|
+
*
|
544
623
|
* Returns the element to which the hidden text area is added.
|
545
624
|
* @returns {DOMElement}
|
546
625
|
**/
|
@@ -553,32 +632,37 @@ var VirtualRenderer = function(container, theme) {
|
|
553
632
|
this.$moveTextAreaToCursor = function() {
|
554
633
|
if (!this.$keepTextAreaAtCursor)
|
555
634
|
return;
|
556
|
-
|
635
|
+
var config = this.layerConfig;
|
557
636
|
var posTop = this.$cursorLayer.$pixelPos.top;
|
558
637
|
var posLeft = this.$cursorLayer.$pixelPos.left;
|
559
|
-
posTop -=
|
638
|
+
posTop -= config.offset;
|
560
639
|
|
561
|
-
|
640
|
+
var style = this.textarea.style;
|
641
|
+
var h = this.lineHeight;
|
642
|
+
if (posTop < 0 || posTop > config.height - h) {
|
643
|
+
style.top = style.left = "0";
|
562
644
|
return;
|
645
|
+
}
|
563
646
|
|
564
647
|
var w = this.characterWidth;
|
565
|
-
if (this.$composition)
|
566
|
-
|
648
|
+
if (this.$composition) {
|
649
|
+
var val = this.textarea.value.replace(/^\x01+/, "");
|
650
|
+
w *= (this.session.$getStringScreenWidth(val)[0]+2);
|
651
|
+
h += 2;
|
652
|
+
}
|
567
653
|
posLeft -= this.scrollLeft;
|
568
654
|
if (posLeft > this.$size.scrollerWidth - w)
|
569
655
|
posLeft = this.$size.scrollerWidth - w;
|
570
656
|
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
this.textarea.style.left = posLeft + "px";
|
577
|
-
this.textarea.style.top = posTop - 1 + "px";
|
657
|
+
posLeft += this.gutterWidth;
|
658
|
+
style.height = h + "px";
|
659
|
+
style.width = w + "px";
|
660
|
+
style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + "px";
|
661
|
+
style.top = Math.min(posTop, this.$size.height - h) + "px";
|
578
662
|
};
|
579
663
|
|
580
664
|
/**
|
581
|
-
*
|
665
|
+
*
|
582
666
|
* [Returns the index of the first visible row.]{: #VirtualRenderer.getFirstVisibleRow}
|
583
667
|
* @returns {Number}
|
584
668
|
**/
|
@@ -587,7 +671,7 @@ var VirtualRenderer = function(container, theme) {
|
|
587
671
|
};
|
588
672
|
|
589
673
|
/**
|
590
|
-
*
|
674
|
+
*
|
591
675
|
* Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
|
592
676
|
* @returns {Number}
|
593
677
|
**/
|
@@ -596,7 +680,7 @@ var VirtualRenderer = function(container, theme) {
|
|
596
680
|
};
|
597
681
|
|
598
682
|
/**
|
599
|
-
*
|
683
|
+
*
|
600
684
|
* Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
|
601
685
|
* @returns {Number}
|
602
686
|
**/
|
@@ -606,7 +690,7 @@ var VirtualRenderer = function(container, theme) {
|
|
606
690
|
};
|
607
691
|
|
608
692
|
/**
|
609
|
-
*
|
693
|
+
*
|
610
694
|
* [Returns the index of the last visible row.]{: #VirtualRenderer.getLastVisibleRow}
|
611
695
|
* @returns {Number}
|
612
696
|
**/
|
@@ -619,8 +703,8 @@ var VirtualRenderer = function(container, theme) {
|
|
619
703
|
/**
|
620
704
|
* Sets the padding for all the layers.
|
621
705
|
* @param {Number} padding A new padding value (in pixels)
|
622
|
-
*
|
623
|
-
*
|
706
|
+
*
|
707
|
+
*
|
624
708
|
*
|
625
709
|
**/
|
626
710
|
this.setPadding = function(padding) {
|
@@ -632,146 +716,271 @@ var VirtualRenderer = function(container, theme) {
|
|
632
716
|
this.$loop.schedule(this.CHANGE_FULL);
|
633
717
|
this.$updatePrintMargin();
|
634
718
|
};
|
719
|
+
|
720
|
+
this.setScrollMargin = function(top, bottom, left, right) {
|
721
|
+
var sm = this.scrollMargin;
|
722
|
+
sm.top = top|0;
|
723
|
+
sm.bottom = bottom|0;
|
724
|
+
sm.right = right|0;
|
725
|
+
sm.left = left|0;
|
726
|
+
sm.v = sm.top + sm.bottom;
|
727
|
+
sm.h = sm.left + sm.right;
|
728
|
+
if (sm.top && this.scrollTop <= 0 && this.session)
|
729
|
+
this.session.setScrollTop(-sm.top);
|
730
|
+
this.updateFull();
|
731
|
+
};
|
635
732
|
|
636
733
|
/**
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
**/
|
734
|
+
* Returns whether the horizontal scrollbar is set to be always visible.
|
735
|
+
* @returns {Boolean}
|
736
|
+
**/
|
641
737
|
this.getHScrollBarAlwaysVisible = function() {
|
642
|
-
return this.$
|
738
|
+
return this.$hScrollBarAlwaysVisible;
|
643
739
|
};
|
644
740
|
|
645
741
|
/**
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
*
|
650
|
-
**/
|
742
|
+
* Identifies whether you want to show the horizontal scrollbar or not.
|
743
|
+
* @param {Boolean} alwaysVisible Set to `true` to make the horizontal scroll bar visible
|
744
|
+
**/
|
651
745
|
this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
746
|
+
this.setOption("hScrollBarAlwaysVisible", alwaysVisible);
|
747
|
+
};
|
748
|
+
/**
|
749
|
+
* Returns whether the horizontal scrollbar is set to be always visible.
|
750
|
+
* @returns {Boolean}
|
751
|
+
**/
|
752
|
+
this.getVScrollBarAlwaysVisible = function() {
|
753
|
+
return this.$vScrollBarAlwaysVisible;
|
657
754
|
};
|
658
755
|
|
659
|
-
|
660
|
-
|
661
|
-
|
756
|
+
/**
|
757
|
+
* Identifies whether you want to show the horizontal scrollbar or not.
|
758
|
+
* @param {Boolean} alwaysVisible Set to `true` to make the horizontal scroll bar visible
|
759
|
+
**/
|
760
|
+
this.setVScrollBarAlwaysVisible = function(alwaysVisible) {
|
761
|
+
this.setOption("vScrollBarAlwaysVisible", alwaysVisible);
|
762
|
+
};
|
763
|
+
|
764
|
+
this.$updateScrollBarV = function() {
|
765
|
+
var scrollHeight = this.layerConfig.maxHeight;
|
766
|
+
var scrollerHeight = this.$size.scrollerHeight;
|
767
|
+
if (!this.$maxLines && this.$scrollPastEnd) {
|
768
|
+
scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd;
|
769
|
+
if (this.scrollTop > scrollHeight - scrollerHeight) {
|
770
|
+
scrollHeight = this.scrollTop + scrollerHeight;
|
771
|
+
this.scrollBarV.scrollTop = null;
|
772
|
+
}
|
773
|
+
}
|
774
|
+
this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v);
|
775
|
+
this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top);
|
776
|
+
};
|
777
|
+
this.$updateScrollBarH = function() {
|
778
|
+
this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);
|
779
|
+
this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left);
|
780
|
+
};
|
781
|
+
|
782
|
+
this.$frozen = false;
|
783
|
+
this.freeze = function() {
|
784
|
+
this.$frozen = true;
|
785
|
+
};
|
786
|
+
|
787
|
+
this.unfreeze = function() {
|
788
|
+
this.$frozen = false;
|
662
789
|
};
|
663
790
|
|
664
791
|
this.$renderChanges = function(changes, force) {
|
665
|
-
if (
|
666
|
-
|
667
|
-
|
792
|
+
if (this.$changes) {
|
793
|
+
changes |= this.$changes;
|
794
|
+
this.$changes = 0;
|
795
|
+
}
|
796
|
+
if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) {
|
797
|
+
this.$changes |= changes;
|
798
|
+
return;
|
799
|
+
}
|
800
|
+
if (this.$size.$dirty) {
|
801
|
+
this.$changes |= changes;
|
802
|
+
return this.onResize(true);
|
803
|
+
}
|
804
|
+
if (!this.lineHeight) {
|
805
|
+
this.$textLayer.checkForSizeChanges();
|
806
|
+
}
|
807
|
+
// this.$logChanges(changes);
|
808
|
+
|
809
|
+
this._signal("beforeRender");
|
810
|
+
var config = this.layerConfig;
|
668
811
|
// text, scrolling and resize changes can cause the view port size to change
|
669
812
|
if (changes & this.CHANGE_FULL ||
|
670
813
|
changes & this.CHANGE_SIZE ||
|
671
814
|
changes & this.CHANGE_TEXT ||
|
672
815
|
changes & this.CHANGE_LINES ||
|
673
|
-
changes & this.CHANGE_SCROLL
|
674
|
-
|
675
|
-
|
676
|
-
|
816
|
+
changes & this.CHANGE_SCROLL ||
|
817
|
+
changes & this.CHANGE_H_SCROLL
|
818
|
+
) {
|
819
|
+
changes |= this.$computeLayerConfig();
|
820
|
+
// If a change is made offscreen and wrapMode is on, then the onscreen
|
821
|
+
// lines may have been pushed down. If so, the first screen row will not
|
822
|
+
// have changed, but the first actual row will. In that case, adjust
|
823
|
+
// scrollTop so that the cursor and onscreen content stays in the same place.
|
824
|
+
// TODO: find a better way to handle this, that works non wrapped case and doesn't compute layerConfig twice
|
825
|
+
if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) {
|
826
|
+
var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight;
|
827
|
+
if (st > 0) {
|
828
|
+
// this check is needed as a workaround for the documentToScreenRow returning -1 if document.length == 0
|
829
|
+
this.scrollTop = st;
|
830
|
+
changes = changes | this.CHANGE_SCROLL;
|
831
|
+
changes |= this.$computeLayerConfig();
|
832
|
+
}
|
833
|
+
}
|
834
|
+
config = this.layerConfig;
|
835
|
+
// update scrollbar first to not lose scroll position when gutter calls resize
|
836
|
+
this.$updateScrollBarV();
|
837
|
+
if (changes & this.CHANGE_H_SCROLL)
|
838
|
+
this.$updateScrollBarH();
|
839
|
+
this.$gutterLayer.element.style.marginTop = (-config.offset) + "px";
|
840
|
+
this.content.style.marginTop = (-config.offset) + "px";
|
841
|
+
this.content.style.width = config.width + 2 * this.$padding + "px";
|
842
|
+
this.content.style.height = config.minHeight + "px";
|
843
|
+
}
|
844
|
+
|
677
845
|
// horizontal scrolling
|
678
846
|
if (changes & this.CHANGE_H_SCROLL) {
|
679
|
-
this.
|
680
|
-
|
681
|
-
// read the value after writing it since the value might get clipped
|
682
|
-
var scrollLeft = this.scroller.scrollLeft;
|
683
|
-
this.scrollLeft = scrollLeft;
|
684
|
-
this.session.setScrollLeft(scrollLeft);
|
685
|
-
|
686
|
-
this.scroller.className = this.scrollLeft == 0 ? "ace_scroller" : "ace_scroller ace_scroll-left";
|
847
|
+
this.content.style.marginLeft = -this.scrollLeft + "px";
|
848
|
+
this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left";
|
687
849
|
}
|
688
850
|
|
689
851
|
// full
|
690
852
|
if (changes & this.CHANGE_FULL) {
|
691
|
-
this.$textLayer.
|
692
|
-
|
693
|
-
|
694
|
-
this.$
|
695
|
-
|
696
|
-
|
697
|
-
this.$markerBack.update(this.layerConfig);
|
698
|
-
this.$markerFront.update(this.layerConfig);
|
699
|
-
this.$cursorLayer.update(this.layerConfig);
|
853
|
+
this.$textLayer.update(config);
|
854
|
+
if (this.$showGutter)
|
855
|
+
this.$gutterLayer.update(config);
|
856
|
+
this.$markerBack.update(config);
|
857
|
+
this.$markerFront.update(config);
|
858
|
+
this.$cursorLayer.update(config);
|
700
859
|
this.$moveTextAreaToCursor();
|
701
860
|
this.$highlightGutterLine && this.$updateGutterLineHighlight();
|
861
|
+
this._signal("afterRender");
|
702
862
|
return;
|
703
863
|
}
|
704
864
|
|
705
865
|
// scrolling
|
706
866
|
if (changes & this.CHANGE_SCROLL) {
|
707
|
-
this.$updateScrollBar();
|
708
867
|
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
|
709
|
-
this.$textLayer.update(
|
868
|
+
this.$textLayer.update(config);
|
710
869
|
else
|
711
|
-
this.$textLayer.scrollLines(
|
870
|
+
this.$textLayer.scrollLines(config);
|
712
871
|
|
713
|
-
if (this
|
714
|
-
this.$gutterLayer.update(
|
715
|
-
this.$markerBack.update(
|
716
|
-
this.$markerFront.update(
|
717
|
-
this.$cursorLayer.update(
|
718
|
-
this.$moveTextAreaToCursor();
|
872
|
+
if (this.$showGutter)
|
873
|
+
this.$gutterLayer.update(config);
|
874
|
+
this.$markerBack.update(config);
|
875
|
+
this.$markerFront.update(config);
|
876
|
+
this.$cursorLayer.update(config);
|
719
877
|
this.$highlightGutterLine && this.$updateGutterLineHighlight();
|
878
|
+
this.$moveTextAreaToCursor();
|
879
|
+
this._signal("afterRender");
|
720
880
|
return;
|
721
881
|
}
|
722
882
|
|
723
883
|
if (changes & this.CHANGE_TEXT) {
|
724
|
-
this.$textLayer.update(
|
725
|
-
if (this
|
726
|
-
this.$gutterLayer.update(
|
884
|
+
this.$textLayer.update(config);
|
885
|
+
if (this.$showGutter)
|
886
|
+
this.$gutterLayer.update(config);
|
727
887
|
}
|
728
888
|
else if (changes & this.CHANGE_LINES) {
|
729
|
-
if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this
|
730
|
-
this.$gutterLayer.update(
|
889
|
+
if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter)
|
890
|
+
this.$gutterLayer.update(config);
|
731
891
|
}
|
732
892
|
else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {
|
733
|
-
if (this
|
734
|
-
this.$gutterLayer.update(
|
893
|
+
if (this.$showGutter)
|
894
|
+
this.$gutterLayer.update(config);
|
735
895
|
}
|
736
896
|
|
737
897
|
if (changes & this.CHANGE_CURSOR) {
|
738
|
-
this.$cursorLayer.update(
|
898
|
+
this.$cursorLayer.update(config);
|
739
899
|
this.$moveTextAreaToCursor();
|
740
900
|
this.$highlightGutterLine && this.$updateGutterLineHighlight();
|
741
901
|
}
|
742
902
|
|
743
903
|
if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {
|
744
|
-
this.$markerFront.update(
|
904
|
+
this.$markerFront.update(config);
|
745
905
|
}
|
746
906
|
|
747
907
|
if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {
|
748
|
-
this.$markerBack.update(
|
908
|
+
this.$markerBack.update(config);
|
749
909
|
}
|
750
910
|
|
751
|
-
|
752
|
-
this.$updateScrollBar();
|
911
|
+
this._signal("afterRender");
|
753
912
|
};
|
754
913
|
|
914
|
+
|
915
|
+
this.$autosize = function() {
|
916
|
+
var height = this.session.getScreenLength() * this.lineHeight;
|
917
|
+
var maxHeight = this.$maxLines * this.lineHeight;
|
918
|
+
var desiredHeight = Math.max(
|
919
|
+
(this.$minLines||1) * this.lineHeight,
|
920
|
+
Math.min(maxHeight, height)
|
921
|
+
) + this.scrollMargin.v + (this.$extraHeight || 0);
|
922
|
+
var vScroll = height > maxHeight;
|
923
|
+
|
924
|
+
if (desiredHeight != this.desiredHeight ||
|
925
|
+
this.$size.height != this.desiredHeight || vScroll != this.$vScroll) {
|
926
|
+
if (vScroll != this.$vScroll) {
|
927
|
+
this.$vScroll = vScroll;
|
928
|
+
this.scrollBarV.setVisible(vScroll);
|
929
|
+
}
|
930
|
+
|
931
|
+
var w = this.container.clientWidth;
|
932
|
+
this.container.style.height = desiredHeight + "px";
|
933
|
+
this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight);
|
934
|
+
// this.$loop.changes = 0;
|
935
|
+
this.desiredHeight = desiredHeight;
|
936
|
+
|
937
|
+
this._signal("autosize");
|
938
|
+
}
|
939
|
+
};
|
940
|
+
|
755
941
|
this.$computeLayerConfig = function() {
|
942
|
+
if (this.$maxLines && this.lineHeight > 1)
|
943
|
+
this.$autosize();
|
944
|
+
|
756
945
|
var session = this.session;
|
946
|
+
var size = this.$size;
|
947
|
+
|
948
|
+
var hideScrollbars = size.height <= 2 * this.lineHeight;
|
949
|
+
var screenLines = this.session.getScreenLength();
|
950
|
+
var maxHeight = screenLines * this.lineHeight;
|
757
951
|
|
758
952
|
var offset = this.scrollTop % this.lineHeight;
|
759
|
-
var minHeight =
|
953
|
+
var minHeight = size.scrollerHeight + this.lineHeight;
|
760
954
|
|
761
955
|
var longestLine = this.$getLongestLine();
|
956
|
+
|
957
|
+
var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible ||
|
958
|
+
size.scrollerWidth - longestLine - 2 * this.$padding < 0);
|
959
|
+
|
960
|
+
var hScrollChanged = this.$horizScroll !== horizScroll;
|
961
|
+
if (hScrollChanged) {
|
962
|
+
this.$horizScroll = horizScroll;
|
963
|
+
this.scrollBarH.setVisible(horizScroll);
|
964
|
+
}
|
965
|
+
|
966
|
+
var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd
|
967
|
+
? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd
|
968
|
+
: 0;
|
969
|
+
maxHeight += scrollPastEnd;
|
970
|
+
|
971
|
+
this.session.setScrollTop(Math.max(-this.scrollMargin.top,
|
972
|
+
Math.min(this.scrollTop, maxHeight - size.scrollerHeight + this.scrollMargin.bottom)));
|
762
973
|
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
974
|
+
this.session.setScrollLeft(Math.max(-this.scrollMargin.left, Math.min(this.scrollLeft,
|
975
|
+
longestLine + 2 * this.$padding - size.scrollerWidth + this.scrollMargin.right)));
|
976
|
+
|
977
|
+
var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||
|
978
|
+
size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop);
|
979
|
+
var vScrollChanged = this.$vScroll !== vScroll;
|
980
|
+
if (vScrollChanged) {
|
981
|
+
this.$vScroll = vScroll;
|
982
|
+
this.scrollBarV.setVisible(vScroll);
|
772
983
|
}
|
773
|
-
var maxHeight = this.session.getScreenLength() * this.lineHeight;
|
774
|
-
this.session.setScrollTop(Math.max(0, Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight)));
|
775
984
|
|
776
985
|
var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;
|
777
986
|
var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));
|
@@ -793,11 +1002,23 @@ var VirtualRenderer = function(container, theme) {
|
|
793
1002
|
firstRowHeight = session.getRowLength(firstRow) * lineHeight;
|
794
1003
|
|
795
1004
|
lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);
|
796
|
-
minHeight =
|
1005
|
+
minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +
|
797
1006
|
firstRowHeight;
|
798
1007
|
|
799
1008
|
offset = this.scrollTop - firstRowScreen * lineHeight;
|
800
1009
|
|
1010
|
+
var changes = 0;
|
1011
|
+
if (this.layerConfig.width != longestLine)
|
1012
|
+
changes = this.CHANGE_H_SCROLL;
|
1013
|
+
// Horizontal scrollbar visibility may have changed, which changes
|
1014
|
+
// the client height of the scroller
|
1015
|
+
if (hScrollChanged || vScrollChanged) {
|
1016
|
+
changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);
|
1017
|
+
this._signal("scrollbarVisibilityChanged");
|
1018
|
+
if (vScrollChanged)
|
1019
|
+
longestLine = this.$getLongestLine();
|
1020
|
+
}
|
1021
|
+
|
801
1022
|
this.layerConfig = {
|
802
1023
|
width : longestLine,
|
803
1024
|
padding : this.$padding,
|
@@ -809,21 +1030,14 @@ var VirtualRenderer = function(container, theme) {
|
|
809
1030
|
minHeight : minHeight,
|
810
1031
|
maxHeight : maxHeight,
|
811
1032
|
offset : offset,
|
1033
|
+
gutterOffset : Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)),
|
812
1034
|
height : this.$size.scrollerHeight
|
813
1035
|
};
|
814
1036
|
|
815
1037
|
// For debugging.
|
816
1038
|
// console.log(JSON.stringify(this.layerConfig));
|
817
1039
|
|
818
|
-
|
819
|
-
this.content.style.marginTop = (-offset) + "px";
|
820
|
-
this.content.style.width = longestLine + 2 * this.$padding + "px";
|
821
|
-
this.content.style.height = minHeight + "px";
|
822
|
-
|
823
|
-
// Horizontal scrollbar visibility may have changed, which changes
|
824
|
-
// the client height of the scroller
|
825
|
-
if (horizScrollChanged)
|
826
|
-
this.onResize(true);
|
1040
|
+
return changes;
|
827
1041
|
};
|
828
1042
|
|
829
1043
|
this.$updateLines = function() {
|
@@ -838,7 +1052,7 @@ var VirtualRenderer = function(container, theme) {
|
|
838
1052
|
|
839
1053
|
// if the last row is unknown -> redraw everything
|
840
1054
|
if (lastRow === Infinity) {
|
841
|
-
if (this
|
1055
|
+
if (this.$showGutter)
|
842
1056
|
this.$gutterLayer.update(layerConfig);
|
843
1057
|
this.$textLayer.update(layerConfig);
|
844
1058
|
return;
|
@@ -851,14 +1065,14 @@ var VirtualRenderer = function(container, theme) {
|
|
851
1065
|
|
852
1066
|
this.$getLongestLine = function() {
|
853
1067
|
var charCount = this.session.getScreenWidth();
|
854
|
-
if (this
|
1068
|
+
if (this.showInvisibles && !this.session.$useWrapMode)
|
855
1069
|
charCount += 1;
|
856
1070
|
|
857
1071
|
return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));
|
858
1072
|
};
|
859
1073
|
|
860
1074
|
/**
|
861
|
-
*
|
1075
|
+
*
|
862
1076
|
* Schedules an update to all the front markers in the document.
|
863
1077
|
**/
|
864
1078
|
this.updateFrontMarkers = function() {
|
@@ -867,7 +1081,7 @@ var VirtualRenderer = function(container, theme) {
|
|
867
1081
|
};
|
868
1082
|
|
869
1083
|
/**
|
870
|
-
*
|
1084
|
+
*
|
871
1085
|
* Schedules an update to all the back markers in the document.
|
872
1086
|
**/
|
873
1087
|
this.updateBackMarkers = function() {
|
@@ -875,8 +1089,8 @@ var VirtualRenderer = function(container, theme) {
|
|
875
1089
|
this.$loop.schedule(this.CHANGE_MARKER_BACK);
|
876
1090
|
};
|
877
1091
|
|
878
|
-
/**
|
879
|
-
*
|
1092
|
+
/**
|
1093
|
+
*
|
880
1094
|
* Deprecated; (moved to [[EditSession]])
|
881
1095
|
* @deprecated
|
882
1096
|
**/
|
@@ -884,7 +1098,7 @@ var VirtualRenderer = function(container, theme) {
|
|
884
1098
|
this.$gutterLayer.addGutterDecoration(row, className);
|
885
1099
|
};
|
886
1100
|
|
887
|
-
/**
|
1101
|
+
/**
|
888
1102
|
* Deprecated; (moved to [[EditSession]])
|
889
1103
|
* @deprecated
|
890
1104
|
**/
|
@@ -893,7 +1107,7 @@ var VirtualRenderer = function(container, theme) {
|
|
893
1107
|
};
|
894
1108
|
|
895
1109
|
/**
|
896
|
-
*
|
1110
|
+
*
|
897
1111
|
* Redraw breakpoints.
|
898
1112
|
**/
|
899
1113
|
this.updateBreakpoints = function(rows) {
|
@@ -901,11 +1115,11 @@ var VirtualRenderer = function(container, theme) {
|
|
901
1115
|
};
|
902
1116
|
|
903
1117
|
/**
|
904
|
-
*
|
1118
|
+
*
|
905
1119
|
* Sets annotations for the gutter.
|
906
1120
|
* @param {Array} annotations An array containing annotations
|
907
1121
|
*
|
908
|
-
*
|
1122
|
+
*
|
909
1123
|
**/
|
910
1124
|
this.setAnnotations = function(annotations) {
|
911
1125
|
this.$gutterLayer.setAnnotations(annotations);
|
@@ -913,7 +1127,7 @@ var VirtualRenderer = function(container, theme) {
|
|
913
1127
|
};
|
914
1128
|
|
915
1129
|
/**
|
916
|
-
*
|
1130
|
+
*
|
917
1131
|
* Updates the cursor icon.
|
918
1132
|
**/
|
919
1133
|
this.updateCursor = function() {
|
@@ -921,7 +1135,7 @@ var VirtualRenderer = function(container, theme) {
|
|
921
1135
|
};
|
922
1136
|
|
923
1137
|
/**
|
924
|
-
*
|
1138
|
+
*
|
925
1139
|
* Hides the cursor icon.
|
926
1140
|
**/
|
927
1141
|
this.hideCursor = function() {
|
@@ -929,7 +1143,7 @@ var VirtualRenderer = function(container, theme) {
|
|
929
1143
|
};
|
930
1144
|
|
931
1145
|
/**
|
932
|
-
*
|
1146
|
+
*
|
933
1147
|
* Shows the cursor icon.
|
934
1148
|
**/
|
935
1149
|
this.showCursor = function() {
|
@@ -943,10 +1157,10 @@ var VirtualRenderer = function(container, theme) {
|
|
943
1157
|
};
|
944
1158
|
|
945
1159
|
/**
|
946
|
-
*
|
1160
|
+
*
|
947
1161
|
* Scrolls the cursor into the first visibile area of the editor
|
948
1162
|
**/
|
949
|
-
this.scrollCursorIntoView = function(cursor, offset) {
|
1163
|
+
this.scrollCursorIntoView = function(cursor, offset, $viewMargin) {
|
950
1164
|
// the editor is not visible
|
951
1165
|
if (this.$size.scrollerHeight === 0)
|
952
1166
|
return;
|
@@ -955,12 +1169,19 @@ var VirtualRenderer = function(container, theme) {
|
|
955
1169
|
|
956
1170
|
var left = pos.left;
|
957
1171
|
var top = pos.top;
|
958
|
-
|
959
|
-
|
1172
|
+
|
1173
|
+
var topMargin = $viewMargin && $viewMargin.top || 0;
|
1174
|
+
var bottomMargin = $viewMargin && $viewMargin.bottom || 0;
|
1175
|
+
|
1176
|
+
var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;
|
1177
|
+
|
1178
|
+
if (scrollTop + topMargin > top) {
|
960
1179
|
if (offset)
|
961
1180
|
top -= offset * this.$size.scrollerHeight;
|
1181
|
+
if (top === 0)
|
1182
|
+
top = -this.scrollMargin.top;
|
962
1183
|
this.session.setScrollTop(top);
|
963
|
-
} else if (
|
1184
|
+
} else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) {
|
964
1185
|
if (offset)
|
965
1186
|
top += offset * this.$size.scrollerHeight;
|
966
1187
|
this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);
|
@@ -970,14 +1191,16 @@ var VirtualRenderer = function(container, theme) {
|
|
970
1191
|
|
971
1192
|
if (scrollLeft > left) {
|
972
1193
|
if (left < this.$padding + 2 * this.layerConfig.characterWidth)
|
973
|
-
left =
|
1194
|
+
left = -this.scrollMargin.left;
|
974
1195
|
this.session.setScrollLeft(left);
|
975
1196
|
} else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {
|
976
1197
|
this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
|
1198
|
+
} else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) {
|
1199
|
+
this.session.setScrollLeft(0);
|
977
1200
|
}
|
978
1201
|
};
|
979
1202
|
|
980
|
-
/**
|
1203
|
+
/**
|
981
1204
|
* {:EditSession.getScrollTop}
|
982
1205
|
* @related EditSession.getScrollTop
|
983
1206
|
* @returns {Number}
|
@@ -986,7 +1209,7 @@ var VirtualRenderer = function(container, theme) {
|
|
986
1209
|
return this.session.getScrollTop();
|
987
1210
|
};
|
988
1211
|
|
989
|
-
/**
|
1212
|
+
/**
|
990
1213
|
* {:EditSession.getScrollLeft}
|
991
1214
|
* @related EditSession.getScrollLeft
|
992
1215
|
* @returns {Number}
|
@@ -996,7 +1219,7 @@ var VirtualRenderer = function(container, theme) {
|
|
996
1219
|
};
|
997
1220
|
|
998
1221
|
/**
|
999
|
-
*
|
1222
|
+
*
|
1000
1223
|
* Returns the first visible row, regardless of whether it's fully visible or not.
|
1001
1224
|
* @returns {Number}
|
1002
1225
|
**/
|
@@ -1005,7 +1228,7 @@ var VirtualRenderer = function(container, theme) {
|
|
1005
1228
|
};
|
1006
1229
|
|
1007
1230
|
/**
|
1008
|
-
*
|
1231
|
+
*
|
1009
1232
|
* Returns the last visible row, regardless of whether it's fully visible or not.
|
1010
1233
|
* @returns {Number}
|
1011
1234
|
**/
|
@@ -1013,11 +1236,11 @@ var VirtualRenderer = function(container, theme) {
|
|
1013
1236
|
return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);
|
1014
1237
|
};
|
1015
1238
|
|
1016
|
-
/**
|
1239
|
+
/**
|
1017
1240
|
* Gracefully scrolls from the top of the editor to the row indicated.
|
1018
1241
|
* @param {Number} row A row id
|
1019
1242
|
*
|
1020
|
-
*
|
1243
|
+
*
|
1021
1244
|
* @related EditSession.setScrollTop
|
1022
1245
|
**/
|
1023
1246
|
this.scrollToRow = function(row) {
|
@@ -1059,7 +1282,7 @@ var VirtualRenderer = function(container, theme) {
|
|
1059
1282
|
* @param {Boolean} animate If `true` animates scrolling
|
1060
1283
|
* @param {Function} callback Function to be called after the animation has finished
|
1061
1284
|
*
|
1062
|
-
*
|
1285
|
+
*
|
1063
1286
|
**/
|
1064
1287
|
this.scrollToLine = function(line, center, animate, callback) {
|
1065
1288
|
var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
|
@@ -1075,38 +1298,52 @@ var VirtualRenderer = function(container, theme) {
|
|
1075
1298
|
|
1076
1299
|
this.animateScrolling = function(fromValue, callback) {
|
1077
1300
|
var toValue = this.scrollTop;
|
1078
|
-
if (this.$animatedScroll
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
_self.session.$scrollTop = -1;
|
1093
|
-
_self.session.setScrollTop(toValue);
|
1094
|
-
toValue = null;
|
1095
|
-
} else {
|
1096
|
-
// do this on separate step to not get spurious scroll event from scrollbar
|
1097
|
-
_self.$timer = clearInterval(_self.$timer);
|
1098
|
-
_self.$inScrollAnimation = false;
|
1099
|
-
callback && callback();
|
1100
|
-
}
|
1101
|
-
}, 10);
|
1301
|
+
if (!this.$animatedScroll)
|
1302
|
+
return;
|
1303
|
+
var _self = this;
|
1304
|
+
|
1305
|
+
if (fromValue == toValue)
|
1306
|
+
return;
|
1307
|
+
|
1308
|
+
if (this.$scrollAnimation) {
|
1309
|
+
var oldSteps = this.$scrollAnimation.steps;
|
1310
|
+
if (oldSteps.length) {
|
1311
|
+
fromValue = oldSteps[0];
|
1312
|
+
if (fromValue == toValue)
|
1313
|
+
return;
|
1314
|
+
}
|
1102
1315
|
}
|
1316
|
+
|
1317
|
+
var steps = _self.$calcSteps(fromValue, toValue);
|
1318
|
+
this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps};
|
1319
|
+
|
1320
|
+
clearInterval(this.$timer);
|
1321
|
+
|
1322
|
+
_self.session.setScrollTop(steps.shift());
|
1323
|
+
// trick session to think it's already scrolled to not loose toValue
|
1324
|
+
_self.session.$scrollTop = toValue;
|
1325
|
+
this.$timer = setInterval(function() {
|
1326
|
+
if (steps.length) {
|
1327
|
+
_self.session.setScrollTop(steps.shift());
|
1328
|
+
_self.session.$scrollTop = toValue;
|
1329
|
+
} else if (toValue != null) {
|
1330
|
+
_self.session.$scrollTop = -1;
|
1331
|
+
_self.session.setScrollTop(toValue);
|
1332
|
+
toValue = null;
|
1333
|
+
} else {
|
1334
|
+
// do this on separate step to not get spurious scroll event from scrollbar
|
1335
|
+
_self.$timer = clearInterval(_self.$timer);
|
1336
|
+
_self.$scrollAnimation = null;
|
1337
|
+
callback && callback();
|
1338
|
+
}
|
1339
|
+
}, 10);
|
1103
1340
|
};
|
1104
1341
|
|
1105
1342
|
/**
|
1106
1343
|
* Scrolls the editor to the y pixel indicated.
|
1107
1344
|
* @param {Number} scrollTop The position to scroll to
|
1108
1345
|
*
|
1109
|
-
*
|
1346
|
+
*
|
1110
1347
|
* @returns {Number}
|
1111
1348
|
**/
|
1112
1349
|
this.scrollToY = function(scrollTop) {
|
@@ -1122,24 +1359,29 @@ var VirtualRenderer = function(container, theme) {
|
|
1122
1359
|
* Scrolls the editor across the x-axis to the pixel indicated.
|
1123
1360
|
* @param {Number} scrollLeft The position to scroll to
|
1124
1361
|
*
|
1125
|
-
*
|
1362
|
+
*
|
1126
1363
|
* @returns {Number}
|
1127
1364
|
**/
|
1128
1365
|
this.scrollToX = function(scrollLeft) {
|
1129
|
-
if (scrollLeft < 0)
|
1130
|
-
scrollLeft = 0;
|
1131
|
-
|
1132
1366
|
if (this.scrollLeft !== scrollLeft)
|
1133
1367
|
this.scrollLeft = scrollLeft;
|
1134
1368
|
this.$loop.schedule(this.CHANGE_H_SCROLL);
|
1135
1369
|
};
|
1136
1370
|
|
1371
|
+
/**
|
1372
|
+
* Scrolls the editor across both x- and y-axes.
|
1373
|
+
* @param {Number} x The x value to scroll to
|
1374
|
+
* @param {Number} y The y value to scroll to
|
1375
|
+
**/
|
1376
|
+
this.scrollTo = function(x, y) {
|
1377
|
+
this.session.setScrollTop(y);
|
1378
|
+
this.session.setScrollLeft(y);
|
1379
|
+
};
|
1380
|
+
|
1137
1381
|
/**
|
1138
1382
|
* Scrolls the editor across both x- and y-axes.
|
1139
1383
|
* @param {Number} deltaX The x value to scroll by
|
1140
1384
|
* @param {Number} deltaY The y value to scroll by
|
1141
|
-
*
|
1142
|
-
*
|
1143
1385
|
**/
|
1144
1386
|
this.scrollBy = function(deltaX, deltaY) {
|
1145
1387
|
deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);
|
@@ -1151,15 +1393,20 @@ var VirtualRenderer = function(container, theme) {
|
|
1151
1393
|
* @param {Number} deltaX The x value to scroll by
|
1152
1394
|
* @param {Number} deltaY The y value to scroll by
|
1153
1395
|
*
|
1154
|
-
*
|
1396
|
+
*
|
1155
1397
|
* @returns {Boolean}
|
1156
1398
|
**/
|
1157
1399
|
this.isScrollableBy = function(deltaX, deltaY) {
|
1158
|
-
if (deltaY < 0 && this.session.getScrollTop()
|
1400
|
+
if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top)
|
1159
1401
|
return true;
|
1160
|
-
if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight
|
1402
|
+
if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight
|
1403
|
+
- this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom)
|
1404
|
+
return true;
|
1405
|
+
if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)
|
1406
|
+
return true;
|
1407
|
+
if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth
|
1408
|
+
- this.layerConfig.width < -1 + this.scrollMargin.right)
|
1161
1409
|
return true;
|
1162
|
-
// todo: handle horizontal scrolling
|
1163
1410
|
};
|
1164
1411
|
|
1165
1412
|
this.pixelToScreenCoordinates = function(x, y) {
|
@@ -1178,9 +1425,8 @@ var VirtualRenderer = function(container, theme) {
|
|
1178
1425
|
var col = Math.round(
|
1179
1426
|
(x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth
|
1180
1427
|
);
|
1181
|
-
|
1182
|
-
|
1183
|
-
);
|
1428
|
+
|
1429
|
+
var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight;
|
1184
1430
|
|
1185
1431
|
return this.session.screenToDocumentPosition(row, Math.max(col, 0));
|
1186
1432
|
};
|
@@ -1190,7 +1436,7 @@ var VirtualRenderer = function(container, theme) {
|
|
1190
1436
|
* @param {Number} row The document row position
|
1191
1437
|
* @param {Number} column The document column position
|
1192
1438
|
*
|
1193
|
-
*
|
1439
|
+
*
|
1194
1440
|
*
|
1195
1441
|
* @returns {Object}
|
1196
1442
|
**/
|
@@ -1208,26 +1454,26 @@ var VirtualRenderer = function(container, theme) {
|
|
1208
1454
|
};
|
1209
1455
|
|
1210
1456
|
/**
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1457
|
+
*
|
1458
|
+
* Focuses the current container.
|
1459
|
+
**/
|
1214
1460
|
this.visualizeFocus = function() {
|
1215
1461
|
dom.addCssClass(this.container, "ace_focus");
|
1216
1462
|
};
|
1217
1463
|
|
1218
1464
|
/**
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1465
|
+
*
|
1466
|
+
* Blurs the current container.
|
1467
|
+
**/
|
1222
1468
|
this.visualizeBlur = function() {
|
1223
1469
|
dom.removeCssClass(this.container, "ace_focus");
|
1224
1470
|
};
|
1225
1471
|
|
1226
|
-
/**
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1472
|
+
/**
|
1473
|
+
* @param {Number} position
|
1474
|
+
*
|
1475
|
+
* @private
|
1476
|
+
**/
|
1231
1477
|
this.showComposition = function(position) {
|
1232
1478
|
if (!this.$composition)
|
1233
1479
|
this.$composition = {
|
@@ -1242,18 +1488,18 @@ var VirtualRenderer = function(container, theme) {
|
|
1242
1488
|
};
|
1243
1489
|
|
1244
1490
|
/**
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1491
|
+
* @param {String} text A string of text to use
|
1492
|
+
*
|
1493
|
+
* Sets the inner text of the current composition to `text`.
|
1494
|
+
**/
|
1249
1495
|
this.setCompositionText = function(text) {
|
1250
1496
|
this.$moveTextAreaToCursor();
|
1251
1497
|
};
|
1252
1498
|
|
1253
1499
|
/**
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1500
|
+
*
|
1501
|
+
* Hides the current composition.
|
1502
|
+
**/
|
1257
1503
|
this.hideComposition = function() {
|
1258
1504
|
if (!this.$composition)
|
1259
1505
|
return;
|
@@ -1264,80 +1510,67 @@ var VirtualRenderer = function(container, theme) {
|
|
1264
1510
|
this.$composition = null;
|
1265
1511
|
};
|
1266
1512
|
|
1267
|
-
this._loadTheme = function(name, callback) {
|
1268
|
-
if (!config.get("packaged"))
|
1269
|
-
return callback();
|
1270
|
-
|
1271
|
-
net.loadScript(config.moduleUrl(name, "theme"), callback);
|
1272
|
-
};
|
1273
|
-
|
1274
1513
|
/**
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
this.setTheme = function(theme) {
|
1514
|
+
* [Sets a new theme for the editor. `theme` should exist, and be a directory path, like `ace/theme/textmate`.]{: #VirtualRenderer.setTheme}
|
1515
|
+
* @param {String} theme The path to a theme
|
1516
|
+
* @param {Function} cb optional callback
|
1517
|
+
*
|
1518
|
+
**/
|
1519
|
+
this.setTheme = function(theme, cb) {
|
1281
1520
|
var _self = this;
|
1521
|
+
this.$themeId = theme;
|
1522
|
+
_self._dispatchEvent('themeChange',{theme:theme});
|
1282
1523
|
|
1283
|
-
this.$themeValue = theme;
|
1284
1524
|
if (!theme || typeof theme == "string") {
|
1285
|
-
var moduleName = theme ||
|
1286
|
-
|
1287
|
-
var module;
|
1288
|
-
try {
|
1289
|
-
module = require(moduleName);
|
1290
|
-
} catch (e) {};
|
1291
|
-
if (module)
|
1292
|
-
return afterLoad(module);
|
1293
|
-
|
1294
|
-
_self._loadTheme(moduleName, function() {
|
1295
|
-
require([moduleName], function(module) {
|
1296
|
-
if (_self.$themeValue !== theme)
|
1297
|
-
return;
|
1298
|
-
|
1299
|
-
afterLoad(module);
|
1300
|
-
});
|
1301
|
-
});
|
1525
|
+
var moduleName = theme || this.$options.theme.initialValue;
|
1526
|
+
config.loadModule(["theme", moduleName], afterLoad);
|
1302
1527
|
} else {
|
1303
1528
|
afterLoad(theme);
|
1304
1529
|
}
|
1305
1530
|
|
1306
|
-
function afterLoad(
|
1531
|
+
function afterLoad(module) {
|
1532
|
+
if (_self.$themeId != theme)
|
1533
|
+
return cb && cb();
|
1534
|
+
if (!module.cssClass)
|
1535
|
+
return;
|
1307
1536
|
dom.importCssString(
|
1308
|
-
|
1309
|
-
|
1537
|
+
module.cssText,
|
1538
|
+
module.cssClass,
|
1310
1539
|
_self.container.ownerDocument
|
1311
1540
|
);
|
1312
1541
|
|
1313
1542
|
if (_self.theme)
|
1314
1543
|
dom.removeCssClass(_self.container, _self.theme.cssClass);
|
1315
1544
|
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
_self.theme = theme;
|
1320
|
-
dom.addCssClass(_self.container, theme.cssClass);
|
1321
|
-
dom.setCssClass(_self.container, "ace_dark", theme.isDark);
|
1322
|
-
|
1323
|
-
var padding = theme.padding || 4;
|
1545
|
+
var padding = "padding" in module ? module.padding
|
1546
|
+
: "padding" in (_self.theme || {}) ? 4 : _self.$padding;
|
1324
1547
|
if (_self.$padding && padding != _self.$padding)
|
1325
1548
|
_self.setPadding(padding);
|
1549
|
+
|
1550
|
+
// this is kept only for backwards compatibility
|
1551
|
+
_self.$theme = module.cssClass;
|
1552
|
+
|
1553
|
+
_self.theme = module;
|
1554
|
+
dom.addCssClass(_self.container, module.cssClass);
|
1555
|
+
dom.setCssClass(_self.container, "ace_dark", module.isDark);
|
1326
1556
|
|
1327
1557
|
// force re-measure of the gutter width
|
1328
1558
|
if (_self.$size) {
|
1329
1559
|
_self.$size.width = 0;
|
1330
|
-
_self
|
1560
|
+
_self.$updateSizeAsync();
|
1331
1561
|
}
|
1562
|
+
|
1563
|
+
_self._dispatchEvent('themeLoaded', {theme:module});
|
1564
|
+
cb && cb();
|
1332
1565
|
}
|
1333
1566
|
};
|
1334
1567
|
|
1335
1568
|
/**
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1569
|
+
* [Returns the path of the current theme.]{: #VirtualRenderer.getTheme}
|
1570
|
+
* @returns {String}
|
1571
|
+
**/
|
1339
1572
|
this.getTheme = function() {
|
1340
|
-
return this.$
|
1573
|
+
return this.$themeId;
|
1341
1574
|
};
|
1342
1575
|
|
1343
1576
|
// Methods allows to add / remove CSS classnames to the editor element.
|
@@ -1345,29 +1578,39 @@ var VirtualRenderer = function(container, theme) {
|
|
1345
1578
|
// a certain mode that editor is in.
|
1346
1579
|
|
1347
1580
|
/**
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
dom.setCssClass(this.container, style, include != false);
|
1581
|
+
* [Adds a new class, `style`, to the editor.]{: #VirtualRenderer.setStyle}
|
1582
|
+
* @param {String} style A class name
|
1583
|
+
*
|
1584
|
+
**/
|
1585
|
+
this.setStyle = function(style, include) {
|
1586
|
+
dom.setCssClass(this.container, style, include !== false);
|
1355
1587
|
};
|
1356
1588
|
|
1357
1589
|
/**
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
this.unsetStyle = function unsetStyle(style) {
|
1590
|
+
* [Removes the class `style` from the editor.]{: #VirtualRenderer.unsetStyle}
|
1591
|
+
* @param {String} style A class name
|
1592
|
+
*
|
1593
|
+
**/
|
1594
|
+
this.unsetStyle = function(style) {
|
1364
1595
|
dom.removeCssClass(this.container, style);
|
1365
1596
|
};
|
1597
|
+
|
1598
|
+
this.setCursorStyle = function(style) {
|
1599
|
+
if (this.scroller.style.cursor != style)
|
1600
|
+
this.scroller.style.cursor = style;
|
1601
|
+
};
|
1366
1602
|
|
1367
1603
|
/**
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1604
|
+
* @param {String} cursorStyle A css cursor style
|
1605
|
+
*
|
1606
|
+
**/
|
1607
|
+
this.setMouseCursor = function(cursorStyle) {
|
1608
|
+
this.scroller.style.cursor = cursorStyle;
|
1609
|
+
};
|
1610
|
+
|
1611
|
+
/**
|
1612
|
+
* Destroys the text and cursor layers for this renderer.
|
1613
|
+
**/
|
1371
1614
|
this.destroy = function() {
|
1372
1615
|
this.$textLayer.destroy();
|
1373
1616
|
this.$cursorLayer.destroy();
|
@@ -1375,5 +1618,147 @@ var VirtualRenderer = function(container, theme) {
|
|
1375
1618
|
|
1376
1619
|
}).call(VirtualRenderer.prototype);
|
1377
1620
|
|
1621
|
+
|
1622
|
+
config.defineOptions(VirtualRenderer.prototype, "renderer", {
|
1623
|
+
animatedScroll: {initialValue: false},
|
1624
|
+
showInvisibles: {
|
1625
|
+
set: function(value) {
|
1626
|
+
if (this.$textLayer.setShowInvisibles(value))
|
1627
|
+
this.$loop.schedule(this.CHANGE_TEXT);
|
1628
|
+
},
|
1629
|
+
initialValue: false
|
1630
|
+
},
|
1631
|
+
showPrintMargin: {
|
1632
|
+
set: function() { this.$updatePrintMargin(); },
|
1633
|
+
initialValue: true
|
1634
|
+
},
|
1635
|
+
printMarginColumn: {
|
1636
|
+
set: function() { this.$updatePrintMargin(); },
|
1637
|
+
initialValue: 80
|
1638
|
+
},
|
1639
|
+
printMargin: {
|
1640
|
+
set: function(val) {
|
1641
|
+
if (typeof val == "number")
|
1642
|
+
this.$printMarginColumn = val;
|
1643
|
+
this.$showPrintMargin = !!val;
|
1644
|
+
this.$updatePrintMargin();
|
1645
|
+
},
|
1646
|
+
get: function() {
|
1647
|
+
return this.$showPrintMargin && this.$printMarginColumn;
|
1648
|
+
}
|
1649
|
+
},
|
1650
|
+
showGutter: {
|
1651
|
+
set: function(show){
|
1652
|
+
this.$gutter.style.display = show ? "block" : "none";
|
1653
|
+
this.$loop.schedule(this.CHANGE_FULL);
|
1654
|
+
this.onGutterResize();
|
1655
|
+
},
|
1656
|
+
initialValue: true
|
1657
|
+
},
|
1658
|
+
fadeFoldWidgets: {
|
1659
|
+
set: function(show) {
|
1660
|
+
dom.setCssClass(this.$gutter, "ace_fade-fold-widgets", show);
|
1661
|
+
},
|
1662
|
+
initialValue: false
|
1663
|
+
},
|
1664
|
+
showFoldWidgets: {
|
1665
|
+
set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)},
|
1666
|
+
initialValue: true
|
1667
|
+
},
|
1668
|
+
showLineNumbers: {
|
1669
|
+
set: function(show) {
|
1670
|
+
this.$gutterLayer.setShowLineNumbers(show);
|
1671
|
+
this.$loop.schedule(this.CHANGE_GUTTER);
|
1672
|
+
},
|
1673
|
+
initialValue: true
|
1674
|
+
},
|
1675
|
+
displayIndentGuides: {
|
1676
|
+
set: function(show) {
|
1677
|
+
if (this.$textLayer.setDisplayIndentGuides(show))
|
1678
|
+
this.$loop.schedule(this.CHANGE_TEXT);
|
1679
|
+
},
|
1680
|
+
initialValue: true
|
1681
|
+
},
|
1682
|
+
highlightGutterLine: {
|
1683
|
+
set: function(shouldHighlight) {
|
1684
|
+
if (!this.$gutterLineHighlight) {
|
1685
|
+
this.$gutterLineHighlight = dom.createElement("div");
|
1686
|
+
this.$gutterLineHighlight.className = "ace_gutter-active-line";
|
1687
|
+
this.$gutter.appendChild(this.$gutterLineHighlight);
|
1688
|
+
return;
|
1689
|
+
}
|
1690
|
+
|
1691
|
+
this.$gutterLineHighlight.style.display = shouldHighlight ? "" : "none";
|
1692
|
+
// if cursorlayer have never been updated there's nothing on screen to update
|
1693
|
+
if (this.$cursorLayer.$pixelPos)
|
1694
|
+
this.$updateGutterLineHighlight();
|
1695
|
+
},
|
1696
|
+
initialValue: false,
|
1697
|
+
value: true
|
1698
|
+
},
|
1699
|
+
hScrollBarAlwaysVisible: {
|
1700
|
+
set: function(val) {
|
1701
|
+
if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll)
|
1702
|
+
this.$loop.schedule(this.CHANGE_SCROLL);
|
1703
|
+
},
|
1704
|
+
initialValue: false
|
1705
|
+
},
|
1706
|
+
vScrollBarAlwaysVisible: {
|
1707
|
+
set: function(val) {
|
1708
|
+
if (!this.$vScrollBarAlwaysVisible || !this.$vScroll)
|
1709
|
+
this.$loop.schedule(this.CHANGE_SCROLL);
|
1710
|
+
},
|
1711
|
+
initialValue: false
|
1712
|
+
},
|
1713
|
+
fontSize: {
|
1714
|
+
set: function(size) {
|
1715
|
+
if (typeof size == "number")
|
1716
|
+
size = size + "px";
|
1717
|
+
this.container.style.fontSize = size;
|
1718
|
+
this.updateFontSize();
|
1719
|
+
},
|
1720
|
+
initialValue: 12
|
1721
|
+
},
|
1722
|
+
fontFamily: {
|
1723
|
+
set: function(name) {
|
1724
|
+
this.container.style.fontFamily = name;
|
1725
|
+
this.updateFontSize();
|
1726
|
+
}
|
1727
|
+
},
|
1728
|
+
maxLines: {
|
1729
|
+
set: function(val) {
|
1730
|
+
this.updateFull();
|
1731
|
+
}
|
1732
|
+
},
|
1733
|
+
minLines: {
|
1734
|
+
set: function(val) {
|
1735
|
+
this.updateFull();
|
1736
|
+
}
|
1737
|
+
},
|
1738
|
+
scrollPastEnd: {
|
1739
|
+
set: function(val) {
|
1740
|
+
val = +val || 0;
|
1741
|
+
if (this.$scrollPastEnd == val)
|
1742
|
+
return;
|
1743
|
+
this.$scrollPastEnd = val;
|
1744
|
+
this.$loop.schedule(this.CHANGE_SCROLL);
|
1745
|
+
},
|
1746
|
+
initialValue: 0,
|
1747
|
+
handlesSet: true
|
1748
|
+
},
|
1749
|
+
fixedWidthGutter: {
|
1750
|
+
set: function(val) {
|
1751
|
+
this.$gutterLayer.$fixedWidth = !!val;
|
1752
|
+
this.$loop.schedule(this.CHANGE_GUTTER);
|
1753
|
+
}
|
1754
|
+
},
|
1755
|
+
theme: {
|
1756
|
+
set: function(val) { this.setTheme(val) },
|
1757
|
+
get: function() { return this.$themeId || this.theme; },
|
1758
|
+
initialValue: "./theme/textmate",
|
1759
|
+
handlesSet: true
|
1760
|
+
}
|
1761
|
+
});
|
1762
|
+
|
1378
1763
|
exports.VirtualRenderer = VirtualRenderer;
|
1379
1764
|
});
|