Skip to content

Commit ad338eb

Browse files
committed
Merge remote-tracking branch 'codemirror/master'
# Conflicts: # addon/edit/continuelist.js
2 parents ba23743 + dac0b89 commit ad338eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1205
-539
lines changed

AUTHORS

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Adam King
99
adanlobato
1010
Adán Lobato
1111
Adrian Aichner
12+
Adrian Heine
13+
Adrien Bertrand
1214
aeroson
1315
Ahmad Amireh
1416
Ahmad M. Zawawi
@@ -61,10 +63,12 @@ anthonygego
6163
Anthony Gégo
6264
Anthony Grimes
6365
Anton Kovalyov
66+
Apollo Zhu
6467
AQNOUCH Mohammed
6568
areos
6669
Arnab Bose
6770
as3boyan
71+
atelierbram
6872
AtomicPages LLC
6973
Atul Bhouraskar
7074
Aurelian Oancea
@@ -82,6 +86,7 @@ Ben Mosher
8286
Bernhard Sirlinger
8387
Bert Chang
8488
Bharad
89+
BigBlueHat
8590
Billy Moon
8691
binny
8792
B Krishna Chaitanya
@@ -151,6 +156,7 @@ deebugger
151156
Deep Thought
152157
Devin Abbott
153158
Devon Carew
159+
Dick Choi
154160
dignifiedquire
155161
Dimage Sapelkin
156162
Dmitry Kiselyov
@@ -270,20 +276,23 @@ Jeff Pickhardt
270276
jem (graphite)
271277
Jeremy Parmenter
272278
Jim
279+
Jim Avery
273280
JobJob
274281
jochenberger
275282
Jochen Berger
276283
Joel Einbinder
277284
joelpinheiro
278285
Johan Ask
279286
John Connor
287+
John-David Dalton
280288
John Engler
281289
John Lees-Miller
282290
John Snelson
283291
John Van Der Loo
284292
Jon Ander Peñalba
285293
Jonas Döbertin
286294
Jonathan Malmaud
295+
Jon Gacnik
287296
jongalloway
288297
Jon Malmaud
289298
Jon Sangster
@@ -306,6 +315,7 @@ [email protected]
306315
kaniga
307316
karevn
308317
Kayur Patel
318+
Kazuhito Hokamura
309319
Ken Newman
310320
ken restivo
311321
Ken Rockot
@@ -321,6 +331,7 @@ Kris Ciccarello
321331
ks-ifware
322332
kubelsmieci
323333
KwanEsq
334+
Kyle Kelley
324335
Lanfei
325336
Lanny
326337
Laszlo Vidacs
@@ -336,6 +347,7 @@ lochel
336347
Lorenzo Stoakes
337348
Luciano Longo
338349
Lu Fangjian
350+
Luke Browning
339351
Luke Granger-Brown
340352
Luke Stagner
341353
lynschinzer
@@ -348,6 +360,7 @@ Manideep
348360
Manuel Rego Casasnovas
349361
Marat Dreizin
350362
Marcel Gerber
363+
Marcelo Camargo
351364
Marco Aurélio
352365
Marco Munizaga
353366
Marcus Bointon
@@ -358,6 +371,7 @@ Mario Pietsch
358371
Mark Anderson
359372
Mark Lentczner
360373
Marko Bonaci
374+
Mark Peace
361375
Markus Bordihn
362376
Martin Balek
363377
Martín Gaitán
@@ -415,6 +429,7 @@ Moritz Schwörer
415429
mps
416430
ms
417431
mtaran-google
432+
Mu-An Chiou
418433
Narciso Jaramillo
419434
Nathan Williams
420435
ndr
@@ -439,12 +454,14 @@ nlwillia
439454
noragrossman
440455
Norman Rzepka
441456
Oreoluwa Onatemowo
457+
Oskar Segersvärd
442458
pablo
443459
pabloferz
444460
Page
445461
Panupong Pasupat
446462
paris
447463
Paris
464+
Paris Kasidiaris
448465
Patil Arpith
449466
Patrick Stoica
450467
Patrick Strawderman
@@ -496,6 +513,7 @@ Samuel Ainsworth
496513
Sam Wilson
497514
sandeepshetty
498515
Sander AKA Redsandro
516+
Sander Verweij
499517
santec
500518
Sascha Peilicke
501519
satamas
@@ -532,12 +550,14 @@ Steffen Beyer
532550
Steffen Bruchmann
533551
Stephen Lavelle
534552
Steve Champagne
553+
Steve Hoover
535554
Steve O'Hara
536555
stoskov
537556
Stu Kennedy
538557
Sungho Kim
539558
sverweij
540559
Taha Jahangir
560+
takamori
541561
Tako Schotanus
542562
Takuji Shimokawa
543563
Tarmil
@@ -547,6 +567,7 @@ tfjgeorge
547567
Thaddee Tyl
548568
thanasis
549569
TheHowl
570+
themrmax
550571
think
551572
Thomas Dvornik
552573
Thomas Kluyver
@@ -557,6 +578,7 @@ Timothy Farrell
557578
Timothy Gu
558579
Timothy Hatcher
559580
TobiasBg
581+
Todd Berman
560582
Tomas-A
561583
Tomas Varaneckas
562584
Tom Erik Støwer

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,63 @@
1+
## 5.21.0 (2016-11-21)
2+
3+
### Bug fixes
4+
5+
Tapping/clicking the editor in [contentEditable mode](http://codemirror.net/doc/manual.html#option_inputStyle) on Chrome now puts the cursor at the tapped position.
6+
7+
Fix various crashes and misbehaviors when reading composition events in [contentEditable mode](http://codemirror.net/doc/manual.html#option_inputStyle).
8+
9+
Catches and ignores an IE 'Unspecified Error' when creating an editor in an iframe before there is a `<body>`.
10+
11+
[merge addon](http://codemirror.net/doc/manual.html#addon_merge): Fix several issues in the chunk-aligning feature.
12+
13+
[verilog mode](http://codemirror.net/mode/verilog): Rewritten to address various issues.
14+
15+
[julia mode](http://codemirror.net/mode/julia): Recognize Julia 0.5 syntax.
16+
17+
[swift mode](http://codemirror.net/mode/swift): Various fixes and adjustments to current syntax.
18+
19+
[markdown mode](http://codemirror.net/mode/markdown): Allow lists without a blank line above them.
20+
21+
### New features
22+
23+
The [`setGutterMarker`](http://codemirror.net/doc/manual.html#setGutterMarker), [`clearGutter`](http://codemirror.net/doc/manual.html#clearGutter), and [`lineInfo`](http://codemirror.net/doc/manual.html#lineInfo) methods are now available on `Doc` objects.
24+
25+
The [`heightAtLine`](http://codemirror.net/doc/manual.html#heightAtLine) method now takes an extra argument to allow finding the height at the top of the line's line widgets.
26+
27+
[ruby mode](http://codemirror.net/mode/ruby): `else` and `elsif` are now immediately indented.
28+
29+
[vim bindings](http://codemirror.net/demo/vim.html): Bind Ctrl-T and Ctrl-D to in- and dedent in insert mode.
30+
31+
## 5.20.2 (2016-10-21)
32+
33+
### Bug fixes
34+
35+
Fix `CodeMirror.version` returning the wrong version number.
36+
37+
## 5.20.0 (2016-10-20)
38+
39+
### Bug fixes
40+
41+
Make `newlineAndIndent` command work with multiple cursors on the same line.
42+
43+
Make sure keypress events for backspace are ignored.
44+
45+
Tokens styled with overlays no longer get a nonsense `cm-cm-overlay` class.
46+
47+
Line endings for pasted content are now normalized to the editor's [preferred ending](http://codemirror.net/doc/manual.html#option_lineSeparator).
48+
49+
[javascript mode](http://codemirror.net/mode/javascript): Improve support for class expressions. Support TypeScript optional class properties, the `abstract` keyword, and return type declarations for arrow functions.
50+
51+
[css mode](http://codemirror.net/mode/css): Fix highlighting of mixed-case keywords.
52+
53+
[closebrackets addon](http://codemirror.net/doc/manual.html#addon_closebrackets): Improve behavior when typing a quote before a string.
54+
55+
### New features
56+
57+
The core is now maintained as a number of small files, using ES6 syntax and modules, under the `src/` directory. A git checkout no longer contains a working `codemirror.js` until you `npm build` (but when installing from NPM, it is included).
58+
59+
The [`refresh`](http://codemirror.net/doc/manual.html#event_refresh) event is now documented and stable.
60+
161
## 5.19.0 (2016-09-20)
262

363
### Bugfixes

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ The CodeMirror community aims to be welcoming to everybody. We use the
2626
[Contributor Covenant
2727
(1.1)](http://contributor-covenant.org/version/1/1/0/) as our code of
2828
conduct.
29+
30+
### Quickstart
31+
32+
To build the project, make sure you have Node.js installed (at least version 6)
33+
and then `npm install`. To run, just open `index.html` in your
34+
browser (you don't need to run a webserver). Run the tests with `npm test`.

addon/display/rulers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
CodeMirror.defineOption("rulers", false, function(cm, val) {
1515
if (cm.state.rulerDiv) {
16-
cm.display.lineSpace.removeChild(cm.state.rulerDiv)
16+
cm.state.rulerDiv.parentElement.removeChild(cm.state.rulerDiv)
1717
cm.state.rulerDiv = null
1818
cm.off("refresh", drawRulers)
1919
}
2020
if (val && val.length) {
21-
cm.state.rulerDiv = cm.display.lineSpace.insertBefore(document.createElement("div"), cm.display.cursorDiv)
21+
cm.state.rulerDiv = cm.display.lineSpace.parentElement.insertBefore(document.createElement("div"), cm.display.lineSpace)
2222
cm.state.rulerDiv.className = "CodeMirror-rulers"
2323
drawRulers(cm)
2424
cm.on("refresh", drawRulers)

addon/edit/closebrackets.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@
116116
if (opening && !range.empty()) {
117117
curType = "surround";
118118
} else if ((identical || !opening) && next == ch) {
119-
if (triples.indexOf(ch) >= 0 && cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == ch + ch + ch)
119+
if (identical && stringStartsAfter(cm, cur))
120+
curType = "both";
121+
else if (triples.indexOf(ch) >= 0 && cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == ch + ch + ch)
120122
curType = "skipThree";
121123
else
122124
curType = "skip";
@@ -192,4 +194,9 @@
192194
stream.start = stream.pos;
193195
}
194196
}
197+
198+
function stringStartsAfter(cm, pos) {
199+
var token = cm.getTokenAt(Pos(pos.line, pos.ch + 1))
200+
return /\bstring/.test(token.type) && token.start == pos.ch
201+
}
195202
});

addon/lint/lint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
var state = cm.state.lint = new LintState(cm, parseOptions(cm, val), hasLintGutter);
227227
if (state.options.lintOnChange !== false)
228228
cm.on("change", onChange);
229-
if (state.options.tooltips != false)
229+
if (state.options.tooltips != false && state.options.tooltips != "gutter")
230230
CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver);
231231

232232
startLinting(cm);

0 commit comments

Comments
 (0)