Skip to content

Commit 3c18350

Browse files
committed
Merge remote-tracking branch 'codemirror/master'
2 parents e087b3e + b3482bb commit 3c18350

Some content is hidden

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

69 files changed

+1307
-525
lines changed

AUTHORS

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Ahmad Amireh
1414
Ahmad M. Zawawi
1515
ahoward
1616
Akeksandr Motsjonov
17+
Alasdair Smith
1718
Alberto González Palomo
1819
Alberto Pose
1920
Albert Xing
@@ -45,6 +46,7 @@ Andre von Houck
4546
Andrey Fedorov
4647
Andrey Klyuchnikov
4748
Andrey Lushnikov
49+
Andrey Shchekin
4850
Andy Joslin
4951
Andy Kimball
5052
Andy Li
@@ -75,9 +77,11 @@ benbro
7577
Beni Cherniavsky-Paskin
7678
Benjamin DeCoste
7779
Ben Keen
80+
Ben Miller
7881
Ben Mosher
7982
Bernhard Sirlinger
8083
Bert Chang
84+
Bharad
8185
Billy Moon
8286
binny
8387
B Krishna Chaitanya
@@ -94,6 +98,7 @@ Brian Sletten
9498
Bruce Mitchener
9599
Caitlin Potter
96100
Calin Barbat
101+
Camilo Roca
97102
Chad Jolly
98103
Chandra Sekhar Pydi
99104
Charles Skelton
@@ -104,6 +109,7 @@ Chris Granger
104109
Chris Houseknecht
105110
Chris Lohfink
106111
Chris Morgan
112+
Chris Smith
107113
Christian Oyarzun
108114
Christian Petrov
109115
Christopher Brown
@@ -135,6 +141,7 @@ Darius Roberts
135141
Dave Brondsema
136142
Dave Myers
137143
David Barnett
144+
David H. Bronke
138145
David Mignot
139146
David Pathakjee
140147
David Vázquez
@@ -183,6 +190,7 @@ Gabriel Gheorghian
183190
Gabriel Horner
184191
Gabriel Nahmias
185192
galambalazs
193+
Gary Sheng
186194
Gautam Mehta
187195
Gavin Douglas
188196
gekkoe
@@ -199,15 +207,18 @@ Gordon Smith
199207
Grant Skinner
200208
greengiant
201209
Gregory Koberger
210+
Grzegorz Mazur
202211
Guillaume Massé
203212
Guillaume Massé
204213
guraga
205214
Gustavo Rodrigues
206215
Hakan Tunc
207216
Hans Engel
208217
Hardest
218+
Harshvardhan Gupta
209219
Hasan Karahan
210220
Hector Oswaldo Caballero
221+
Hendrik Wallbaum
211222
Herculano Campos
212223
Hiroyuki Makino
213224
hitsthings
@@ -230,6 +241,7 @@ Jakob Miland
230241
Jakub Vrana
231242
Jakub Vrána
232243
James Campos
244+
James Howard
233245
James Thorne
234246
Jamie Hill
235247
Jan Jongboom
@@ -240,6 +252,7 @@ Jan Schär
240252
Jan T. Sott
241253
Jared Dean
242254
Jared Forsyth
255+
Jared Jacobs
243256
Jason
244257
Jason Barnabe
245258
Jason Grout
@@ -249,6 +262,7 @@ Jason Siefken
249262
Jaydeep Solanki
250263
Jean Boussier
251264
Jeff Blaisdell
265+
Jeff Jenkins
252266
jeffkenton
253267
Jeff Pickhardt
254268
jem (graphite)
@@ -257,6 +271,7 @@ Jim
257271
JobJob
258272
jochenberger
259273
Jochen Berger
274+
joelpinheiro
260275
Johan Ask
261276
John Connor
262277
John Engler
@@ -272,6 +287,7 @@ Jon Sangster
272287
Joost-Wim Boekesteijn
273288
Joseph Pecoraro
274289
Josh Cohen
290+
Josh Soref
275291
Joshua Newman
276292
Josh Watzman
277293
jots
@@ -298,6 +314,7 @@ Koh Zi Han, Cliff
298314
komakino
299315
Konstantin Lopuhin
300316
koops
317+
Kris Ciccarello
301318
ks-ifware
302319
kubelsmieci
303320
KwanEsq
@@ -315,13 +332,16 @@ LM
315332
lochel
316333
Lorenzo Stoakes
317334
Luciano Longo
335+
Lu Fangjian
336+
Luke Granger-Brown
318337
Luke Stagner
319338
lynschinzer
320339
M1cha
321340
Madhura Jayaratne
322341
Maksim Lin
323342
Maksym Taran
324343
Malay Majithia
344+
Manideep
325345
Manuel Rego Casasnovas
326346
Marat Dreizin
327347
Marcel Gerber
@@ -349,6 +369,7 @@ mats cronqvist
349369
Matt Gaide
350370
Matthew Bauer
351371
Matthew Beale
372+
matthewhayes
352373
Matthew Rathbone
353374
Matthias Bussonnier
354375
Matthias BUSSONNIER
@@ -425,8 +446,10 @@ Patrick Stoica
425446
Patrick Strawderman
426447
Paul Garvin
427448
Paul Ivanov
449+
Paul Masson
428450
Pavel
429451
Pavel Feldman
452+
Pavel Petržela
430453
Pavel Strashkin
431454
Paweł Bartkiewicz
432455
peteguhl
@@ -463,6 +486,7 @@ Ruslan Osmanov
463486
Ryan Prior
464487
sabaca
465488
Samuel Ainsworth
489+
Sam Wilson
466490
sandeepshetty
467491
Sander AKA Redsandro
468492
santec
@@ -476,6 +500,7 @@ Scott Aikin
476500
Scott Goodhew
477501
Sebastian Zaha
478502
Sergey Goder
503+
Sergey Tselovalnikov
479504
Se-Won Kim
480505
shaund
481506
shaun gilchrist
@@ -485,6 +510,7 @@ sheopory
485510
Shiv Deepak
486511
Shmuel Englard
487512
Shubham Jain
513+
Siamak Mokhtari
488514
silverwind
489515
sinkuu
490516
snasa
@@ -520,6 +546,7 @@ Thomas Schmid
520546
Tim Alby
521547
Tim Baumann
522548
Timothy Farrell
549+
Timothy Gu
523550
Timothy Hatcher
524551
TobiasBg
525552
Tomas-A
@@ -532,11 +559,13 @@ Triangle717
532559
Tristan Tarrant
533560
TSUYUSATO Kitsune
534561
twifkak
562+
VapidWorx
535563
Vestimir Markov
536564
vf
537565
Victor Bocharsky
538566
Vincent Woo
539567
Volker Mische
568+
Weiyan Shao
540569
wenli
541570
Wes Cossick
542571
Wesley Wiser

CHANGELOG.md

Lines changed: 115 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,115 @@
1+
## 5.17.0 (2016-07-19)
2+
3+
### Bugfixes
4+
5+
Fix problem with wrapped trailing whitespace displaying incorrectly.
6+
7+
Prevent IME dialog from overlapping typed content in Chrome.
8+
9+
Improve measuring of characters near a line wrap.
10+
11+
[javascript mode](http://codemirror.net/mode/javascript): Improve support for `async`, allow trailing commas in `import` lists.
12+
13+
[vim bindings](http://codemirror.net/demo/vim.html): Fix backspace in replace mode.
14+
15+
[sublime bindings](http://codemirror.net/demo/sublime.html): Fix some key bindings on OS X to match Sublime Text.
16+
17+
### New features
18+
19+
[markdown mode](http://codemirror.net/mode/markdown): Add more classes to image links in highlight-formatting mode.
20+
21+
## 5.16.0 (2016-06-20)
22+
23+
### Bugfixes
24+
25+
Fix glitches when dragging content caused by the drop indicator receiving mouse events.
26+
27+
Make Control-drag work on Firefox.
28+
29+
Make clicking or selection-dragging at the end of a wrapped line select the right position.
30+
31+
[show-hint addon](http://codemirror.net/doc/manual.html#addon_show-hint): Prevent widget scrollbar from hiding part of the hint text.
32+
33+
[rulers addon](http://codemirror.net/doc/manual.html#addon_rulers): Prevent rulers from forcing a horizontal editor scrollbar.
34+
35+
### New features
36+
37+
[search addon](http://codemirror.net/doc/manual.html#addon_search): Automatically bind search-related keys in persistent dialog.
38+
39+
[sublime keymap](http://codemirror.net/demo/sublime.html): Add a multi-cursor aware smart backspace binding.
40+
41+
## 5.15.2 (2016-05-20)
42+
43+
### Bugfixes
44+
45+
Fix a critical document corruption bug that occurs when a document is gradually grown.
46+
47+
## 5.15.0 (2016-05-20)
48+
49+
### Bugfixes
50+
51+
Fix bug that caused the selection to reset when focusing the editor in contentEditable input mode.
52+
53+
Fix issue where not all ASCII control characters were being replaced by placeholders.
54+
55+
Remove the assumption that all modes have a `startState` method from several wrapping modes.
56+
57+
Fix issue where the editor would complain about overlapping collapsed ranges when there weren't any.
58+
59+
Optimize document tree building when loading or pasting huge chunks of content.
60+
61+
[markdown mode](http://codemirror.net/mode/markdown/): Fix several issues in matching link targets.
62+
63+
[clike mode](http://codemirror.net/mode/clike/): Improve indentation of C++ template declarations.
64+
65+
### New features
66+
67+
Explicitly bind Ctrl-O on OS X to make that binding (“open line”) act as expected.
68+
69+
Pasting [linewise-copied](http://codemirror.net/doc/manual.html#option_lineWiseCopyCut) content when there is no selection now inserts the lines above the current line.
70+
71+
[javascript mode](http://codemirror.net/mode/javascript/): Support `async`/`await` and improve support for TypeScript type syntax.
72+
73+
## 5.14.2 (2016-04-20)
74+
75+
### Bugfixes
76+
77+
Push a new package to NPM due to an [NPM bug](https://github.com/npm/npm/issues/5082) omitting the LICENSE file in 5.14.0.
78+
79+
Set `dataTransfer.effectAllowed` in `dragstart` handler to help browsers use the right drag icon.
80+
81+
Add the [mbox mode](http://codemirror.net/mode/mbox/index.html) to `mode/meta.js`.
82+
83+
## 5.14.0 (2016-04-20)
84+
85+
### Bugfixes
86+
87+
[`posFromIndex`](http://codemirror.net/doc/manual.html#posFromIndex) and [`indexFromPos`](http://codemirror.net/doc/manual.html#indexFromPos) now take [`lineSeparator`](http://codemirror.net/doc/manual.html#option_lineSeparator) into account.
88+
89+
[vim bindings](http://codemirror.net/demo/vim.html): Only call `.save()` when it is actually available.
90+
91+
[comment addon](http://codemirror.net/doc/manual.html#addon_comment): Be careful not to mangle multi-line strings.
92+
93+
[Python mode](http://codemirror.net/mode/python/index.html): Improve distinguishing of decorators from `@` operators.
94+
95+
[`findMarks`](http://codemirror.net/doc/manual.html#findMarks): No longer return marks that touch but don't overlap given range.
96+
97+
### New features
98+
99+
[vim bindings](http://codemirror.net/demo/vim.html): Add yank command.
100+
101+
[match-highlighter addon](http://codemirror.net/doc/manual.html#addon_match-highlighter): Add `trim` option to disable ignoring of whitespace.
102+
103+
[PowerShell mode](http://codemirror.net/mode/powershell/index.html): Added.
104+
105+
[Yacas mode](http://codemirror.net/mode/yacas/index.html): Added.
106+
107+
[Web IDL mode](http://codemirror.net/mode/webidl/index.html): Added.
108+
109+
[SAS mode](http://codemirror.net/mode/sas/index.html): Added.
110+
111+
[mbox mode](http://codemirror.net/mode/mbox/index.html): Added.
112+
1113
## 5.13.2 (2016-03-23)
2114

3115
### Bugfixes
@@ -492,9 +604,9 @@ Integrate some bugfixes, enhancements to the vim keymap, and new modes ([D](http
492604

493605
* New mode: [Common Lisp](http://codemirror.net/mode/commonlisp/index.html).
494606
* Fix right-click select-all on most browsers.
495-
* Change the way highlighting happens:
496-
Saves memory and CPU cycles.
497-
`compareStates` is no longer needed.
607+
* Change the way highlighting happens:
608+
Saves memory and CPU cycles.
609+
`compareStates` is no longer needed.
498610
`onHighlightComplete` no longer works.
499611
* Integrate mode (Markdown, XQuery, CSS, sTex) tests in central testsuite.
500612
* Add a [`CodeMirror.version`](http://codemirror.net/doc/manual.html#version) property.

addon/display/rulers.js

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,26 @@
1111
})(function(CodeMirror) {
1212
"use strict";
1313

14-
CodeMirror.defineOption("rulers", false, function(cm, val, old) {
15-
if (old && old != CodeMirror.Init) {
16-
clearRulers(cm);
17-
cm.off("refresh", refreshRulers);
14+
CodeMirror.defineOption("rulers", false, function(cm, val) {
15+
if (cm.state.rulerDiv) {
16+
cm.display.lineSpace.removeChild(cm.state.rulerDiv)
17+
cm.state.rulerDiv = null
18+
cm.off("refresh", drawRulers)
1819
}
1920
if (val && val.length) {
20-
setRulers(cm);
21-
cm.on("refresh", refreshRulers);
21+
cm.state.rulerDiv = cm.display.lineSpace.insertBefore(document.createElement("div"), cm.display.cursorDiv)
22+
cm.state.rulerDiv.className = "CodeMirror-rulers"
23+
drawRulers(cm)
24+
cm.on("refresh", drawRulers)
2225
}
2326
});
2427

25-
function clearRulers(cm) {
26-
for (var i = cm.display.lineSpace.childNodes.length - 1; i >= 0; i--) {
27-
var node = cm.display.lineSpace.childNodes[i];
28-
if (/(^|\s)CodeMirror-ruler($|\s)/.test(node.className))
29-
node.parentNode.removeChild(node);
30-
}
31-
}
32-
33-
function setRulers(cm) {
28+
function drawRulers(cm) {
29+
cm.state.rulerDiv.textContent = ""
3430
var val = cm.getOption("rulers");
3531
var cw = cm.defaultCharWidth();
3632
var left = cm.charCoords(CodeMirror.Pos(cm.firstLine(), 0), "div").left;
37-
var minH = cm.display.scroller.offsetHeight + 30;
33+
cm.state.rulerDiv.style.minHeight = (cm.display.scroller.offsetHeight + 30) + "px";
3834
for (var i = 0; i < val.length; i++) {
3935
var elt = document.createElement("div");
4036
elt.className = "CodeMirror-ruler";
@@ -49,15 +45,7 @@
4945
if (conf.width) elt.style.borderLeftWidth = conf.width;
5046
}
5147
elt.style.left = (left + col * cw) + "px";
52-
elt.style.top = "-50px";
53-
elt.style.bottom = "-20px";
54-
elt.style.minHeight = minH + "px";
55-
cm.display.lineSpace.insertBefore(elt, cm.display.cursorDiv);
48+
cm.state.rulerDiv.appendChild(elt)
5649
}
5750
}
58-
59-
function refreshRulers(cm) {
60-
clearRulers(cm);
61-
setRulers(cm);
62-
}
6351
});

0 commit comments

Comments
 (0)