Skip to content

Commit 94b1aea

Browse files
committed
Merge branch 'master' into win32-build
2 parents 63e8825 + 1c32fde commit 94b1aea

Some content is hidden

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

90 files changed

+1701
-593
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8

.gitattributes

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
*.txt text
2-
*.js text
3-
*.html text
4-
*.md text
5-
*.json text
6-
*.yml text
7-
*.css text
8-
*.svg text
1+
*.txt text eol=lf
2+
*.js text eol=lf
3+
*.html text eol=lf
4+
*.md text eol=lf
5+
*.json text eol=lf
6+
*.yml text eol=lf
7+
*.css text eol=lf
8+
*.svg text eol=lf

AUTHORS

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Arsène von Wyss
7474
Arthur Müller
7575
Arun Narasani
7676
as3boyan
77+
asolove
7778
atelierbram
7879
AtomicPages LLC
7980
Atul Bhouraskar
@@ -87,6 +88,7 @@ Bem Jones-Bey
8788
benbro
8889
Beni Cherniavsky-Paskin
8990
Benjamin DeCoste
91+
Benjamin Young
9092
Ben Keen
9193
Ben Miller
9294
Ben Mosher
@@ -125,6 +127,7 @@ Chris Houseknecht
125127
Chris Lohfink
126128
Chris Morgan
127129
Chris Smith
130+
Christian Gruen
128131
Christian Oyarzun
129132
Christian Petrov
130133
Christopher Brown
@@ -134,6 +137,7 @@ Christopher Pfohl
134137
Chunliang Lyu
135138
ciaranj
136139
CodeAnimal
140+
CodeBitt
137141
coderaiser
138142
Cole R Lawrence
139143
ComFreek
@@ -151,6 +155,7 @@ Daniel Kesler
151155
Daniel KJ
152156
Daniel Neel
153157
Daniel Parnell
158+
Danila Malyutin
154159
Danny Yoo
155160
darealshinji
156161
Darius Roberts
@@ -180,6 +185,7 @@ Drew Khoury
180185
Drini Cami
181186
Dror BG
182187
duralog
188+
dwelle
183189
eborden
184190
edsharp
185191
ekhaled
@@ -217,6 +223,7 @@ Gautam Mehta
217223
Gavin Douglas
218224
gekkoe
219225
Geordie Hall
226+
George Stephanis
220227
geowarin
221228
Gerard Braad
222229
Gergely Hegykozi
@@ -288,6 +295,7 @@ Jason Siefken
288295
Jaydeep Solanki
289296
Jean Boussier
290297
Jeff Blaisdell
298+
Jeff Hanke
291299
Jeff Jenkins
292300
jeffkenton
293301
Jeff Pickhardt
@@ -309,6 +317,7 @@ John Snelson
309317
John Van Der Loo
310318
Jon Ander Peñalba
311319
Jonas Döbertin
320+
Jonas Helfer
312321
Jonathan Malmaud
313322
Jon Gacnik
314323
jongalloway
@@ -339,6 +348,7 @@ Ken Newman
339348
ken restivo
340349
Ken Rockot
341350
Kevin Earls
351+
Kevin Kwok
342352
Kevin Muret
343353
Kevin Sawicki
344354
Kevin Ushey
@@ -352,6 +362,7 @@ ks-ifware
352362
kubelsmieci
353363
KwanEsq
354364
Kyle Kelley
365+
KyleMcNutt
355366
Lanfei
356367
Lanny
357368
Laszlo Vidacs
@@ -431,7 +442,9 @@ Michael Goderbauer
431442
Michael Grey
432443
Michael Kaminsky
433444
Michael Lehenbauer
445+
Michael Walker
434446
Michael Zhou
447+
Michal Čihař
435448
Michal Dorner
436449
Mighty Guava
437450
Miguel Castillo
@@ -448,10 +461,12 @@ misfo
448461
mkaminsky11
449462
mloginov
450463
Moritz Schwörer
464+
Moshe Wajnberg
451465
mps
452466
ms
453467
mtaran-google
454468
Mu-An Chiou
469+
mzabuawala
455470
Narciso Jaramillo
456471
Nathan Williams
457472
ndr
@@ -465,6 +480,7 @@ Nicholas Bollweg
465480
Nicholas Bollweg (Nick)
466481
Nick Kreeger
467482
Nick Small
483+
Nicolas Kick
468484
Nicolò Ribaudo
469485
Niels van Groningen
470486
nightwing
@@ -483,6 +499,7 @@ pablo
483499
pabloferz
484500
Pablo Zubieta
485501
Page
502+
paladox
486503
Panupong Pasupat
487504
paris
488505
Paris
@@ -507,6 +524,7 @@ Philipp A
507524
Philip Stadermann
508525
Pierre Gerold
509526
Piët Delport
527+
Pieter Ouwerkerk
510528
Pontus Melke
511529
prasanthj
512530
Prasanth J
@@ -547,6 +565,7 @@ sandeepshetty
547565
Sander AKA Redsandro
548566
Sander Verweij
549567
santec
568+
Sarah McAlear and Wenlin Zhang
550569
Sascha Peilicke
551570
satamas
552571
satchmorun
@@ -556,6 +575,7 @@ S. Chris Colbert
556575
SCLINIC\jdecker
557576
Scott Aikin
558577
Scott Goodhew
578+
Sebastian Wilzbach
559579
Sebastian Zaha
560580
Sergey Goder
561581
Sergey Tselovalnikov
@@ -571,6 +591,7 @@ Shmuel Englard
571591
Shubham Jain
572592
Siamak Mokhtari
573593
silverwind
594+
Simon Edwards
574595
sinkuu
575596
snasa
576597
soliton4
@@ -582,6 +603,7 @@ Stas Kobzar
582603
Stefan Borsje
583604
Steffen Beyer
584605
Steffen Bruchmann
606+
Steffen Kowalski
585607
Stephen Lavelle
586608
Steve Champagne
587609
Steve Hoover
@@ -594,9 +616,11 @@ Taha Jahangir
594616
takamori
595617
Tako Schotanus
596618
Takuji Shimokawa
619+
Takuya Matsuyama
597620
Tarmil
598621
TDaglis
599622
tel
623+
Tentone
600624
tfjgeorge
601625
Thaddee Tyl
602626
thanasis
@@ -613,6 +637,7 @@ Timothy Gu
613637
Timothy Hatcher
614638
TobiasBg
615639
Todd Berman
640+
Todd Kennedy
616641
Tomas-A
617642
Tomas Varaneckas
618643
Tom Erik Støwer
@@ -624,6 +649,7 @@ Triangle717
624649
Tristan Tarrant
625650
TSUYUSATO Kitsune
626651
twifkak
652+
Tyler Long
627653
VapidWorx
628654
Vestimir Markov
629655
vf
@@ -646,6 +672,7 @@ Yassin N. Hassan
646672
YNH Webdev
647673
Yunchi Luo
648674
Yuvi Panda
675+
Yvonnick Esnault
649676
Zac Anger
650677
Zachary Dremann
651678
Zeno Rocha

CHANGELOG.md

Lines changed: 97 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,97 @@
1+
## 5.29.0 (2017-08-24)
2+
3+
### Bug fixes
4+
5+
Fix crash in contentEditable input style when editing near a bookmark.
6+
7+
Make sure change origins are preserved when splitting changes on [read-only marks](http://codemirror.net/doc/manual.html#mark_readOnly).
8+
9+
[javascript mode](http://codemirror.net/mode/javascript/): More support for TypeScript syntax.
10+
11+
[d mode](http://codemirror.net/mode/d/): Support nested comments.
12+
13+
[python mode](http://codemirror.net/mode/python/): Improve tokenizing of operators.
14+
15+
[markdown mode](http://codemirror.net/mode/markdown/): Further improve CommonMark conformance.
16+
17+
[css mode](http://codemirror.net/mode/css/): Don't run comment tokens through the mode's state machine.
18+
19+
[shell mode](http://codemirror.net/mode/shell/): Allow strings to span lines.
20+
21+
[search addon](http://codemirror.net/demo/search/): Fix crash in persistent search when `extraKeys` is null.
22+
23+
## 5.28.0 (2017-07-21)
24+
25+
### Bug fixes
26+
27+
Fix copying of, or replacing editor content with, a single dash character when copying a big selection in some corner cases.
28+
29+
Make [`"goLineLeft"`](http://codemirror.net/doc/manual.html#command_goLineLeft)/`"goLineRight"` behave better on wrapped lines.
30+
31+
[sql mode](http://codemirror.net/mode/sql/): Fix tokenizing of multi-dot operator and allow digits in subfield names.
32+
33+
[searchcursor addon](http://codemirror.net/doc/manual.html#addon_searchcursor): Fix infinite loop on some composed character inputs.
34+
35+
[markdown mode](http://codemirror.net/mode/markdown/): Make list parsing more CommonMark-compliant.
36+
37+
[gfm mode](http://codemirror.net/mode/gfm/): Highlight colon syntax for emoji.
38+
39+
### New features
40+
41+
Expose [`startOperation`](http://codemirror.net/doc/manual.html#startOperation) and `endOperation` for explicit operation management.
42+
43+
[sublime bindings](http://codemirror.net/demo/sublime.html): Add extend-selection (Ctrl-Alt- or Cmd-Shift-Up/Down).
44+
45+
## 5.27.4 (2017-06-29)
46+
47+
### Bug fixes
48+
49+
Fix crash when using mode lookahead.
50+
51+
[markdown mode](http://codemirror.net/mode/markdown/): Don't block inner mode's indentation support.
52+
53+
## 5.27.2 (2017-06-22)
54+
55+
### Bug fixes
56+
57+
Fix crash in the [simple mode](http://codemirror.net/demo/simplemode.html) addon.
58+
59+
## 5.27.0 (2017-06-22)
60+
61+
### Bug fixes
62+
63+
Fix infinite loop in forced display update.
64+
65+
Properly disable the hidden textarea when `readOnly` is `"nocursor"`.
66+
67+
Calling the `Doc` constructor without `new` works again.
68+
69+
[sql mode](http://codemirror.net/mode/sql/): Handle nested comments.
70+
71+
[javascript mode](http://codemirror.net/mode/javascript/): Improve support for TypeScript syntax.
72+
73+
[markdown mode](http://codemirror.net/mode/markdown/): Fix bug where markup was ignored on indented paragraph lines.
74+
75+
[vim bindings](http://codemirror.net/demo/vim.html): Referencing invalid registers no longer causes an uncaught exception.
76+
77+
[rust mode](http://codemirror.net/mode/rust/): Add the correct MIME type.
78+
79+
[matchbrackets addon](http://codemirror.net/doc/manual.html#addon_matchbrackets): Document options.
80+
81+
### New features
82+
83+
Mouse button clicks can now be bound in keymaps by using names like `"LeftClick"` or `"Ctrl-Alt-MiddleTripleClick"`. When bound to a function, that function will be passed the position of the click as second argument.
84+
85+
The behavior of mouse selection and dragging can now be customized with the [`configureMouse`](http://codemirror.net/doc/manual.html#option_configureMouse) option.
86+
87+
Modes can now look ahead across line boundaries with the [`StringStream`](http://codemirror.net/doc/manual.html#StringStream)`.lookahead` method.
88+
89+
Introduces a `"type"` token type, makes modes that recognize types output it, and add styling for it to the themes.
90+
91+
New [`pasteLinesPerSelection`](http://codemirror.net/doc/manual.html#option_pasteLinesPerSelection) option to control the behavior of pasting multiple lines into multiple selections.
92+
93+
[searchcursor addon](http://codemirror.net/doc/manual.html#addon_searchcursor): Support multi-line regular expression matches, and normalize strings when matching.
94+
195
## 5.26.0 (2017-05-22)
296

397
### Bug fixes
@@ -18,7 +112,7 @@ More careful restoration of selections in widgets, during editor redraw.
18112

19113
### New features
20114

21-
[vim bindings](http://codemirror.net/mode/demo/vim.html): Parse line offsets in line or range specs.
115+
[vim bindings](http://codemirror.net/demo/vim.html): Parse line offsets in line or range specs.
22116

23117
## 5.25.2 (2017-04-20)
24118

@@ -76,7 +170,7 @@ Add `role=presentation` to more DOM elements to improve screen reader support.
76170

77171
[continuelist addon](http://codemirror.net/doc/manual.html#addon_continuelist): Support continuing task lists.
78172

79-
[vim bindings](http://codemirror.net/mode/demo/vim.html): Make Y behave like yy.
173+
[vim bindings](http://codemirror.net/demo/vim.html): Make Y behave like yy.
80174

81175
[sql mode](http://codemirror.net/mode/sql/): Support sqlite dialect.
82176

@@ -122,7 +216,7 @@ Fix bug in handling of read-only marked text.
122216

123217
Positions now support a `sticky` property which determines whether they should be associated with the character before (value `"before"`) or after (value `"after"`) them.
124218

125-
[vim bindings](http://codemirror.net/mode/demo/vim.html): Make it possible to remove built-in bindings through the API.
219+
[vim bindings](http://codemirror.net/demo/vim.html): Make it possible to remove built-in bindings through the API.
126220

127221
[comment addon](http://codemirror.net/doc/manual.html#addon_comment): Support a per-mode <code>useInnerComments</code> option to optionally suppress descending to the inner modes to get comment strings.
128222

addon/comment/continuecomment.js

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,28 @@
1818
if (cm.getOption("disableInput")) return CodeMirror.Pass;
1919
var ranges = cm.listSelections(), mode, inserts = [];
2020
for (var i = 0; i < ranges.length; i++) {
21-
var pos = ranges[i].head, token = cm.getTokenAt(pos);
22-
if (token.type != "comment") return CodeMirror.Pass;
23-
var modeHere = CodeMirror.innerMode(cm.getMode(), token.state).mode;
21+
var pos = ranges[i].head
22+
if (!/\bcomment\b/.test(cm.getTokenTypeAt(pos))) return CodeMirror.Pass;
23+
var modeHere = cm.getModeAt(pos)
2424
if (!mode) mode = modeHere;
2525
else if (mode != modeHere) return CodeMirror.Pass;
2626

2727
var insert = null;
2828
if (mode.blockCommentStart && mode.blockCommentContinue) {
29-
var end = token.string.indexOf(mode.blockCommentEnd);
30-
var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found;
31-
if (end != -1 && end == token.string.length - mode.blockCommentEnd.length && pos.ch >= end) {
29+
var line = cm.getLine(pos.line).slice(0, pos.ch)
30+
var end = line.indexOf(mode.blockCommentEnd), found
31+
if (end != -1 && end == pos.ch - mode.blockCommentEnd.length) {
3232
// Comment ended, don't continue it
33-
} else if (token.string.indexOf(mode.blockCommentStart) == 0) {
34-
insert = full.slice(0, token.start);
35-
if (!/^\s*$/.test(insert)) {
36-
insert = "";
37-
for (var j = 0; j < token.start; ++j) insert += " ";
33+
} else if ((found = line.indexOf(mode.blockCommentStart)) > -1) {
34+
insert = line.slice(0, found)
35+
if (/\S/.test(insert)) {
36+
insert = ""
37+
for (var j = 0; j < found; ++j) insert += " "
3838
}
39-
} else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 &&
40-
found + mode.blockCommentContinue.length > token.start &&
41-
/^\s*$/.test(full.slice(0, found))) {
42-
insert = full.slice(0, found);
39+
} else if ((found = line.indexOf(mode.blockCommentContinue)) > -1 && !/\S/.test(line.slice(0, found))) {
40+
insert = line.slice(0, found)
4341
}
44-
if (insert != null) insert += mode.blockCommentContinue;
42+
if (insert != null) insert += mode.blockCommentContinue
4543
}
4644
if (insert == null && mode.lineComment && continueLineCommentEnabled(cm)) {
4745
var line = cm.getLine(pos.line), found = line.indexOf(mode.lineComment);

0 commit comments

Comments
 (0)