Comparing changes
Open a pull request
|
|
marijnh |
Start removing subdirectory LICENSE files
Moving to a situation where there's only one LICENSE for the whole distribution. |
2b180ab
|
|||
|
|
marijnh |
Add an AUTHORS file
And a script to update it from the git data. |
9476e3d
|
|||
|
|
marijnh |
Fix .changed method for bookmarks
Issue #1709 |
eb567f4
|
|||
|
|
marijnh |
Fix confused test case
|
9025f2f
|
|||
|
|
ibdknox + marijnh |
Allow multiple bookmarks to be shown at a point
Signed-off-by: Chris Granger <ibdknox@gmail.com> |
96400e8
|
|||
|
|
marijnh |
Revise patch 96400e8
Issue #1710 |
670464a
|
|||
|
|
Andrey Lushnikov + marijnh |
Fix race condition in 5dd4080
|
88a03e3
|
|
|
marijnh |
Remove remaining local LICENSE files
|
3e4540f
|
|||
|
|
idleberg + marijnh |
[paraiso theme] Add
|
1984f29
|
|||
|
|
idleberg + marijnh |
[paraiso theme] Fix url
|
92c906f
|
|
|
jochenberger + marijnh |
the mode for "Properties files" should be "properties", not "clike"
|
849035a
|
|
|
bendecoste + marijnh |
[vim mode] Fix visual mode downwards movement bug
Previously, if you tried to move further down the document than exist the cursor would not move down. This sets selectionEnd.line to be no greater than the total length of the document. |
b86ffff
|
|||
|
|
hsk81 + marijnh |
[rst mode] LaTex/Python inner mode glitches
The were some minor issues w.r.t. where exactly an `stex` or `python` inner mode starts and where the outer `rst` mode resumes; fixed. |
455a880
|
|||
|
|
hsk81 + marijnh |
[rst mode] Removed unknown bugs catcher
|
f813f18
|
|
|
marijnh |
Prevent onFocus/resetInput from interfering with nested editor
|
29392e8
|
|||
|
|
marijnh |
[brace-fold addon] Use getTokenStyleAt instead of getTokenAt when sca…
…nning |
36409a9
|
|||
|
|
marijnh |
Use a bigger search range when finding a start-of-parse point in mixe…
…d modes |
ba21985
|
|||
|
|
marijnh |
[brace-fold addon] Fix bad use of lastIndexOf
|
fd11deb
|
|||
|
|
steveohara + marijnh |
[velocity mode] Update
* Updated for CodeMirror 3 - added comment clock declarations * Corrected handling of macro calls with a body * Added extra features for detecting variables within strings and methods & properties of objects * Corrected the detection of methods and properties of Java objects |
0d45af3
|
|||
|
|
marijnh |
(Mostly) handle cursor positioning around multiple bookmarks in same …
…position Closes #1726 |
5558371
|
|||
|
|
marijnh |
Disable another test on Phantom
(Works in real browsers.) |
84d12b2
|
|
|
marijnh |
Re-reset the input right after a focus event
It seems recent versions of Chrome/Blink fire the handler first, and then clear the selection. Issue #1730 |
5804a93
|
|||
|
|
Andrey Lushnikov + marijnh |
[xml mode] Fix value-less attributes
Issue #902 |
7f82421
|
|
|
marijnh |
Clear measure div after line measurement
To prevent a lot of DOM nodes from sticking around after measuring a long line, easing the pressure on the GC. |
4e061c0
|
|||
|
|
marijnh |
[continuecomment addon] Move to addon/comment (from addon/edit)
|
d649488
|
|
|
chriscoyier + marijnh |
"grey" is an accepted named color value (same as "gray")
|
57036ab
|
|
|
mtaran + marijnh |
Python function/class definition highlighting.
|
3f5c843
|
|||
|
|
mats cronqvist + marijnh |
erlang mode bug fixes
|
b8a3850
|
|||
|
|
pydichandra + marijnh |
Configurable delay between selection of a word to highlighting of word.
current delay of 100ms between selection of word to highlighting is almost instantaneous. |
8a55c04
|
|||
|
|
twiss + marijnh |
Fix linenumbers when undoing multiple changes
|
1f27f94
|
|||
|
|
marijnh |
Fix bug in handling of Esc key in IE
|
0252410
|
|
|
ingorichter + marijnh |
[css mode] Add properties for CSS regions
|
015b2e6
|
|||
|
|
marijnh |
Move to a new website layout
|
12a25ea
|
|||
|
|
marijnh |
[project page] Fix broken sentence
|
33a142f
|
|
|
Dominator008 + marijnh |
Check if "cur" is null in patchDisplay()
|
d37ac03
|
|||
|
|
marijnh |
[bidi demo] Turn off line wrapping, add note about bug
|
83a624d
|
|||
|
|
marijnh |
Mark release 3.16.0
|
633bd90
|
- +244 −0 AUTHORS
- +1 −1 LICENSE
- +1 −1 addon/{edit → comment}/continuecomment.js
- +6 −0 addon/display/fullscreen.css
- +30 −0 addon/display/fullscreen.js
- +3 −3 addon/fold/brace-fold.js
- +40 −0 addon/fold/comment-fold.js
- +7 −10 addon/hint/show-hint.js
- +34 −0 addon/scroll/scrollpastend.js
- +4 −1 addon/search/match-highlighter.js
- +6 −0 bin/authors.sh
- +1 −1 bower.json
- +25 −17 demo/activeline.html
- +27 −17 demo/anywordhint.html
- +31 −18 demo/bidi.html
- +22 −23 demo/btree.html
- +27 −16 demo/buffers.html
- +25 −16 demo/changemode.html
- +27 −27 demo/closebrackets.html
- +29 −26 demo/closetag.html
- +31 −21 demo/complete.html
- +31 −22 demo/emacs.html
- +37 −27 demo/folding.html
- +34 −51 demo/fullscreen.html
- +33 −23 demo/html5complete.html
- +25 −16 demo/indentwrap.html
- +31 −20 demo/lint.html
- +24 −15 demo/loadmode.html
- +25 −16 demo/marker.html
- +25 −16 demo/markselection.html
- +25 −16 demo/matchhighlighter.html
- +28 −17 demo/matchtags.html
- +28 −13 demo/merge.html
- +25 −16 demo/multiplex.html
- +26 −17 demo/mustache.html
- +24 −15 demo/placeholder.html
- +29 −17 demo/preview.html
- +24 −15 demo/resize.html
- +26 −14 demo/runmode.html
- +28 −19 demo/search.html
- +22 −10 demo/spanaffectswrapping_shim.html
- +41 −35 demo/tern.html
- +58 −39 demo/theme.html
- +24 −15 demo/trailingspace.html
- +27 −18 demo/variableheight.html
- +28 −19 demo/vim.html
- +24 −15 demo/visibletabs.html
- +26 −15 demo/widget.html
- +28 −18 demo/xmlcomplete.html
- +42 −0 doc/activebookmark.js
- BIN doc/baboon.png
- +0 −153 doc/baboon_vector.svg
- +25 −20 doc/compress.html
- +167 −113 doc/docs.css
- +53 −55 doc/internals.html
- BIN doc/logo.png
- +147 −0 doc/logo.svg
- +97 −83 doc/manual.html
- +0 −100 doc/modes.html
- +22 −17 doc/realworld.html
- +285 −77 doc/{oldrelease.html → releases.html}
- +21 −20 doc/reporting.html
- +23 −25 doc/upgrade_v2.2.html
- +69 −66 doc/upgrade_v3.html
- +172 −464 index.html
- +5 −0 keymap/vim.js
- +1 −0 lib/codemirror.css
- +58 −28 lib/codemirror.js
- +26 −15 mode/apl/index.html
- +27 −15 mode/asterisk/index.html
- +111 −19 mode/clike/index.html
- +27 −27 mode/clike/scala.html
- +27 −15 mode/clojure/index.html
- +50 −35 mode/cobol/index.html
- +0 −22 mode/coffeescript/LICENSE
- +27 −15 mode/coffeescript/index.html
- +27 −15 mode/commonlisp/index.html
- +21 −19 mode/css/css.js
- +27 −15 mode/css/index.html
- +27 −15 mode/css/scss.html
- +26 −15 mode/d/index.html
- +27 −15 mode/diff/index.html
- +28 −15 mode/ecl/index.html
- +122 −102 mode/erlang/erlang.js
- +28 −17 mode/erlang/index.html
- +27 −16 mode/gas/index.html
- +32 −24 mode/gfm/index.html
- +27 −16 mode/go/index.html
- +26 −15 mode/groovy/index.html
- +31 −19 mode/haml/index.html
- +27 −16 mode/haskell/index.html
- +27 −14 mode/haxe/index.html
- +29 −18 mode/htmlembedded/index.html
- +31 −19 mode/htmlmixed/index.html
- +27 −14 mode/http/index.html
- +106 −0 mode/index.html
- +27 −15 mode/jade/index.html
- +30 −17 mode/javascript/index.html
- +3 −2 mode/javascript/javascript.js
- +27 −14 mode/javascript/typescript.html
- +27 −15 mode/jinja2/index.html
- +29 −17 mode/less/index.html
- +0 −23 mode/livescript/LICENSE
- +28 −15 mode/livescript/index.html
- +29 −17 mode/lua/index.html
- +28 −18 mode/markdown/index.html
- +1 −1 mode/meta.js
- +28 −16 mode/mirc/index.html
- +27 −13 mode/nginx/index.html
- +27 −15 mode/ntriples/index.html
- +22 −7 mode/ocaml/index.html
- +0 −7 mode/pascal/LICENSE
- +27 −14 mode/pascal/index.html
- +0 −19 mode/perl/LICENSE
- +27 −14 mode/perl/index.html
- +31 −20 mode/php/index.html
- +25 −12 mode/pig/index.html
- +27 −15 mode/properties/index.html
- +0 −21 mode/python/LICENSE.txt
- +28 −16 mode/python/index.html
- +12 −4 mode/python/python.js
- +28 −15 mode/q/index.html
- +0 −24 mode/r/LICENSE
- +27 −15 mode/r/index.html
- +24 −10 mode/rpm/changes/index.html
- +24 −9 mode/rpm/spec/index.html
- +0 −21 mode/rst/LICENSE.txt
- +25 −15 mode/rst/index.html
- +20 −21 mode/rst/rst.js
- +0 −24 mode/ruby/LICENSE
- +28 −16 mode/ruby/index.html
- +27 −14 mode/rust/index.html
- +28 −16 mode/sass/index.html
- +27 −15 mode/scheme/index.html
- +22 −7 mode/shell/index.html
- +0 −19 mode/sieve/LICENSE
- +27 −15 mode/sieve/index.html
- +26 −15 mode/smalltalk/index.html
- +27 −17 mode/smarty/index.html
- +29 −22 mode/smartymixed/index.html
- +28 −16 mode/sparql/index.html
- +43 −37 mode/sql/index.html
- +27 −15 mode/stex/index.html
- +29 −15 mode/tcl/index.html
- +29 −16 mode/tiddlywiki/index.html
- +29 −15 mode/tiki/index.html
- +27 −15 mode/turtle/index.html
- +0 −21 mode/vb/LICENSE.txt
- +32 −17 mode/vb/index.html
- +27 −15 mode/vbscript/index.html
- +32 −16 mode/velocity/index.html
- +54 −12 mode/velocity/velocity.js
- +25 −14 mode/verilog/index.html
- +27 −15 mode/xml/index.html
- +1 −1 mode/xml/xml.js
- +0 −20 mode/xquery/LICENSE
- +30 −41 mode/xquery/index.html
- +5 −1 mode/xquery/xquery.js
- +27 −15 mode/yaml/index.html
- +8 −8 mode/yaml/yaml.js
- +27 −14 mode/z80/index.html
- +1 −1 package.json
- +1 −1 test/driver.js
- +59 −46 test/index.html
- +29 −0 test/test.js
- +1 −0 theme/3024-day.css
- +1 −0 theme/3024-night.css
- +1 −1 theme/ambiance.css
- +1 −0 theme/base16-dark.css
- +1 −0 theme/base16-light.css
- +3 −0 theme/blackboard.css
- +3 −0 theme/cobalt.css
- +2 −4 theme/eclipse.css
- +3 −0 theme/elegant.css
- +11 −2 theme/erlang-dark.css
- +3 −0 theme/lesser-dark.css
- +2 −2 theme/midnight.css
- +1 −0 theme/monokai.css
- +3 −0 theme/neat.css
- +3 −0 theme/night.css
- +34 −0 theme/paraiso-dark.css
- +34 −0 theme/paraiso-light.css
- +2 −0 theme/rubyblue.css
- +2 −7 theme/solarized.css
- +26 −0 theme/the-matrix.css
- +1 −0 theme/tomorrow-night-eighties.css
- +2 −0 theme/twilight.css
- +3 −0 theme/vibrant-ink.css
- +4 −1 theme/xq-dark.css
- +1 −1 theme/xq-light.css
| @@ -0,0 +1,244 @@ | ||
| +List of CodeMirror contributors. Updated before every release. | ||
| + | ||
| +4r2r | ||
| +Aaron Brooks | ||
| +Adam King | ||
| +adanlobato | ||
| +Adán Lobato | ||
| +aeroson | ||
| +Ahmad Amireh | ||
| +Ahmad M. Zawawi | ||
| +ahoward | ||
| +Akeksandr Motsjonov | ||
| +Albert Xing | ||
| +Alexander Pavlov | ||
| +Alexander Schepanovski | ||
| +alexey-k | ||
| +Alex Piggott | ||
| +Amy | ||
| +Ananya Sen | ||
| +Andre von Houck | ||
| +Andrey Lushnikov | ||
| +Andy Kimball | ||
| +Andy Li | ||
| +angelozerr | ||
| +angelo.zerr@gmail.com | ||
| +Ankit Ahuja | ||
| +Ansel Santosa | ||
| +Anthony Grimes | ||
| +areos | ||
| +Atul Bhouraskar | ||
| +Aurelian Oancea | ||
| +Bastian Müller | ||
| +benbro | ||
| +Benjamin DeCoste | ||
| +Ben Keen | ||
| +boomyjee | ||
| +borawjm | ||
| +Brandon Frohs | ||
| +Brian Sletten | ||
| +Bruce Mitchener | ||
| +Chandra Sekhar Pydi | ||
| +Charles Skelton | ||
| +Chris Coyier | ||
| +Chris Granger | ||
| +Chris Morgan | ||
| +Christopher Brown | ||
| +CodeAnimal | ||
| +ComFreek | ||
| +dagsta | ||
| +Dan Heberden | ||
| +Daniel, Dao Quang Minh | ||
| +Daniel Faust | ||
| +Daniel Huigens | ||
| +Daniel Neel | ||
| +Daniel Parnell | ||
| +Danny Yoo | ||
| +David Mignot | ||
| +David Pathakjee | ||
| +deebugger | ||
| +Deep Thought | ||
| +Dominator008 | ||
| +Domizio Demichelis | ||
| +Drew Bratcher | ||
| +Drew Hintz | ||
| +Drew Khoury | ||
| +Dror BG | ||
| +duralog | ||
| +edsharp | ||
| +ekhaled | ||
| +Eric Allam | ||
| +eustas | ||
| +Fauntleroy | ||
| +fbuchinger | ||
| +feizhang365 | ||
| +Felipe Lalanne | ||
| +Felix Raab | ||
| +Filip Noetzel | ||
| +flack | ||
| +Ford_Lawnmower | ||
| +Gabriel Nahmias | ||
| +galambalazs | ||
| +Gautam Mehta | ||
| +Glenn Ruehle | ||
| +Golevka | ||
| +Gordon Smith | ||
| +greengiant | ||
| +Guillaume Massé | ||
| +Hans Engel | ||
| +Hardest | ||
| +Hasan Karahan | ||
| +Hocdoc | ||
| +Ian Beck | ||
| +Ian Wehrman | ||
| +Ian Wetherbee | ||
| +Ice White | ||
| +ICHIKAWA, Yuji | ||
| +Ingo Richter | ||
| +Irakli Gozalishvili | ||
| +Ivan Kurnosov | ||
| +Jacob Lee | ||
| +Jakub Vrana | ||
| +James Campos | ||
| +James Thorne | ||
| +Jamie Hill | ||
| +Jan Jongboom | ||
| +jankeromnes | ||
| +Jan Keromnes | ||
| +Jan T. Sott | ||
| +Jason | ||
| +Jason Grout | ||
| +Jason Johnston | ||
| +Jason San Jose | ||
| +Jason Siefken | ||
| +Jean Boussier | ||
| +jeffkenton | ||
| +Jeff Pickhardt | ||
| +jem (graphite) | ||
| +Jochen Berger | ||
| +John Connor | ||
| +John Lees-Miller | ||
| +John Snelson | ||
| +jongalloway | ||
| +Joost-Wim Boekesteijn | ||
| +Joseph Pecoraro | ||
| +Joshua Newman | ||
| +jots | ||
| +Juan Benavides Romero | ||
| +Jucovschi Constantin | ||
| +jwallers@gmail.com | ||
| +kaniga | ||
| +Ken Newman | ||
| +Ken Rockot | ||
| +Kevin Sawicki | ||
| +Klaus Silveira | ||
| +Koh Zi Han, Cliff | ||
| +komakino | ||
| +Konstantin Lopuhin | ||
| +koops | ||
| +ks-ifware | ||
| +Lanny | ||
| +leaf corcoran | ||
| +Leonya Khachaturov | ||
| +Liam Newman | ||
| +List of contributors. Updated before every release. | ||
| +LM | ||
| +Lorenzo Stoakes | ||
| +lynschinzer | ||
| +Maksim Lin | ||
| +Maksym Taran | ||
| +Marat Dreizin | ||
| +Marco Aurélio | ||
| +Marijn Haverbeke | ||
| +Mario Pietsch | ||
| +Mark Lentczner | ||
| +Mason Malone | ||
| +Mateusz Paprocki | ||
| +mats cronqvist | ||
| +Matthew Beale | ||
| +Matthias BUSSONNIER | ||
| +Matt McDonald | ||
| +Matt Pass | ||
| +Matt Sacks | ||
| +Maximilian Hils | ||
| +Max Kirsch | ||
| +mbarkhau | ||
| +Metatheos | ||
| +Micah Dubinko | ||
| +Michael Lehenbauer | ||
| +Michael Zhou | ||
| +Mighty Guava | ||
| +Miguel Castillo | ||
| +Mike | ||
| +Mike Brevoort | ||
| +Mike Diaz | ||
| +Mike Ivanov | ||
| +Mike Kadin | ||
| +MinRK | ||
| +misfo | ||
| +mps | ||
| +Narciso Jaramillo | ||
| +Nathan Williams | ||
| +nerbert | ||
| +nguillaumin | ||
| +Niels van Groningen | ||
| +Nikita Beloglazov | ||
| +Nikita Vasilyev | ||
| +nlwillia | ||
| +pablo | ||
| +Page | ||
| +Patrick Strawderman | ||
| +Paul Garvin | ||
| +Paul Ivanov | ||
| +Pavel Feldman | ||
| +Paweł Bartkiewicz | ||
| +peteguhl | ||
| +peterkroon | ||
| +Peter Kroon | ||
| +prasanthj | ||
| +Prasanth J | ||
| +Rahul | ||
| +Randy Edmunds | ||
| +Richard Z.H. Wang | ||
| +robertop23 | ||
| +Robert Plummer | ||
| +Ruslan Osmanov | ||
| +sabaca | ||
| +Samuel Ainsworth | ||
| +sandeepshetty | ||
| +santec | ||
| +Sascha Peilicke | ||
| +satchmorun | ||
| +sathyamoorthi | ||
| +SCLINIC\jdecker | ||
| +shaund | ||
| +shaun gilchrist | ||
| +Shmuel Englard | ||
| +sonson | ||
| +spastorelli | ||
| +Stas Kobzar | ||
| +Stefan Borsje | ||
| +Steffen Beyer | ||
| +Steve O'Hara | ||
| +Tarmil | ||
| +tfjgeorge | ||
| +Thaddee Tyl | ||
| +think | ||
| +Thomas Dvornik | ||
| +Thomas Schmid | ||
| +Tim Baumann | ||
| +Timothy Farrell | ||
| +Timothy Hatcher | ||
| +Tomas Varaneckas | ||
| +Tom Erik Støwer | ||
| +Tom MacWright | ||
| +Tony Jian | ||
| +Vestimir Markov | ||
| +vf | ||
| +Volker Mische | ||
| +William Jamieson | ||
| +Wojtek Ptak | ||
| +Xavier Mendez | ||
| +Yunchi Luo | ||
| +Yuvi Panda | ||
| +Zachary Dremann |
| @@ -1,4 +1,4 @@ | ||
| -Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> | ||
| +Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> and others | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| @@ -10,7 +10,7 @@ | ||
| var mode = CodeMirror.innerMode(cm.getMode(), token.state).mode; | ||
| var space; | ||
| - if (token.type == "comment" && mode.blockCommentStart) { | ||
| + if (token.type == "comment" && mode.blockCommentStart && mode.blockCommentContinue) { | ||
| var end = token.string.indexOf(mode.blockCommentEnd); | ||
| var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found; | ||
| if (end != -1 && end == token.string.length - mode.blockCommentEnd.length) { | ||
| @@ -0,0 +1,6 @@ | ||
| +.CodeMirror-fullscreen { | ||
| + position: fixed; | ||
| + top: 0; left: 0; right: 0; bottom: 0; | ||
| + height: auto; | ||
| + z-index: 9999; | ||
| +} |
| @@ -0,0 +1,30 @@ | ||
| +(function() { | ||
| + "use strict"; | ||
| + | ||
| + CodeMirror.defineOption("fullScreen", false, function(cm, val, old) { | ||
| + if (old == CodeMirror.Init) old = false; | ||
| + if (!old == !val) return; | ||
| + if (val) setFullscreen(cm); | ||
| + else setNormal(cm); | ||
| + }); | ||
| + | ||
| + function setFullscreen(cm) { | ||
| + var wrap = cm.getWrapperElement(); | ||
| + cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset, | ||
| + width: wrap.style.width, height: wrap.style.height}; | ||
| + wrap.style.width = wrap.style.height = ""; | ||
| + wrap.className += " CodeMirror-fullscreen"; | ||
| + document.documentElement.style.overflow = "hidden"; | ||
| + cm.refresh(); | ||
| + } | ||
| + | ||
| + function setNormal(cm) { | ||
| + var wrap = cm.getWrapperElement(); | ||
| + wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, ""); | ||
| + document.documentElement.style.overflow = ""; | ||
| + var info = cm.state.fullScreenRestore; | ||
| + wrap.style.width = info.width; wrap.style.height = info.height; | ||
| + window.scrollTo(info.scrollLeft, info.scrollTop); | ||
| + cm.refresh(); | ||
| + } | ||
| +})(); |
| @@ -4,15 +4,15 @@ CodeMirror.registerHelper("fold", "brace", function(cm, start) { | ||
| function findOpening(openCh) { | ||
| for (var at = start.ch, pass = 0;;) { | ||
| - var found = lineText.lastIndexOf(openCh, at - 1); | ||
| + var found = at <= 0 ? -1 : lineText.lastIndexOf(openCh, at - 1); | ||
| if (found == -1) { | ||
| if (pass == 1) break; | ||
| pass = 1; | ||
| at = lineText.length; | ||
| continue; | ||
| } | ||
| if (pass == 1 && found < start.ch) break; | ||
| - tokenType = cm.getTokenAt(CodeMirror.Pos(line, found + 1)).type; | ||
| + tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)); | ||
| if (!/^(comment|string)/.test(tokenType)) return found + 1; | ||
| at = found - 1; | ||
| } | ||
| @@ -34,7 +34,7 @@ CodeMirror.registerHelper("fold", "brace", function(cm, start) { | ||
| if (nextClose < 0) nextClose = text.length; | ||
| pos = Math.min(nextOpen, nextClose); | ||
| if (pos == text.length) break; | ||
| - if (cm.getTokenAt(CodeMirror.Pos(i, pos + 1)).type == tokenType) { | ||
| + if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == tokenType) { | ||
| if (pos == nextOpen) ++count; | ||
| else if (!--count) { end = i; endCh = pos; break outer; } | ||
| } | ||
| @@ -0,0 +1,40 @@ | ||
| +CodeMirror.registerHelper("fold", "comment", function(cm, start) { | ||
| + var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd; | ||
| + if (!startToken || !endToken) return; | ||
| + var line = start.line, lineText = cm.getLine(line); | ||
| + | ||
| + var startCh; | ||
| + for (var at = start.ch, pass = 0;;) { | ||
| + var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1); | ||
| + if (found == -1) { | ||
| + if (pass == 1) return; | ||
| + pass = 1; | ||
| + at = lineText.length; | ||
| + continue; | ||
| + } | ||
| + if (pass == 1 && found < start.ch) return; | ||
| + if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)))) { | ||
| + startCh = found + startToken.length; | ||
| + break; | ||
| + } | ||
| + at = found - 1; | ||
| + } | ||
| + | ||
| + var depth = 1, lastLine = cm.lastLine(), end, endCh; | ||
| + outer: for (var i = line; i <= lastLine; ++i) { | ||
| + var text = cm.getLine(i), pos = i == line ? startCh : 0; | ||
| + for (;;) { | ||
| + var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos); | ||
| + if (nextOpen < 0) nextOpen = text.length; | ||
| + if (nextClose < 0) nextClose = text.length; | ||
| + pos = Math.min(nextOpen, nextClose); | ||
| + if (pos == text.length) break; | ||
| + if (pos == nextOpen) ++depth; | ||
| + else if (!--depth) { end = i; endCh = pos; break outer; } | ||
| + ++pos; | ||
| + } | ||
| + } | ||
| + if (end == null || line == end && endCh == startCh) return; | ||
| + return {from: CodeMirror.Pos(line, startCh), | ||
| + to: CodeMirror.Pos(end, endCh)}; | ||
| +}); |
Showing you all comments on commits in this comparison.
q42jaap
commented on deac75c
Jul 30, 2013
|
Marijn, this seems not to work correctly (anymore). The widget stays closed after activity. I think that's odd behavior |
|
Indeed, that broke it. Try with 730d5dd |
|
time budget should be time or budget Just my two cents, |
|
Indeed. See aef141a |
|
Hi Marijn, Just noticed there is a bad link in the Ruby mode index.html that points to the Ubalo license you removed in this commit. I'm curious about why you removed these LICENSE files - I would expect that they are legally important to show the correct copyright, no? By removing them, aren't you obfuscating the original owners? The licenses are also subtly different and add requirements like "Neither the name of the Ubalo, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.". Is that no longer relevant for some reason? Interesting aside, looks like Ubalo was acquired by Twitter, so I'd expect the LICENSE is technically owned by them now. Hopefully they follow through with the "only for defense" legal strategy. :) |
|
The link has been removed in 2024a3f I confirmed with all the copyright holders that it was okay to move the project under a single license. This makes it much easier for users to see what the licensing situation is. |
|
Awesome! Thanks for the clarification. |