Skip to content

Commit dc49a63

Browse files
committed
Merge remote-tracking branch 'codemirror/master'
# Conflicts: # package.json
2 parents 89e0383 + 735ed37 commit dc49a63

File tree

114 files changed

+1457
-1063
lines changed

Some content is hidden

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

114 files changed

+1457
-1063
lines changed

AUTHORS

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Abdelouahab
66
Abe Fettig
77
Adam Ahmed
88
Adam King
9+
Adam Particka
910
adanlobato
1011
Adán Lobato
1112
Adrian Aichner
@@ -69,6 +70,7 @@ Apollo Zhu
6970
AQNOUCH Mohammed
7071
areos
7172
Arnab Bose
73+
Arsène von Wyss
7274
Arthur Müller
7375
Arun Narasani
7476
as3boyan
@@ -200,6 +202,7 @@ ficristo
200202
Filip Noetzel
201203
Filip Stollár
202204
flack
205+
Florian Felten
203206
ForbesLindesay
204207
Forbes Lindesay
205208
Ford_Lawnmower
@@ -257,6 +260,7 @@ Irakli Gozalishvili
257260
Ivan Kurnosov
258261
Ivoah
259262
Jacob Lee
263+
Jaimin
260264
Jake Peyser
261265
Jakob Miland
262266
Jakub Vrana
@@ -265,6 +269,7 @@ James Campos
265269
James Howard
266270
James Thorne
267271
Jamie Hill
272+
Jamie Morris
268273
Jan Jongboom
269274
jankeromnes
270275
Jan Keromnes
@@ -417,6 +422,7 @@ Max Schaefer
417422
Max Xiantu
418423
mbarkhau
419424
McBrainy
425+
mce2
420426
melpon
421427
Metatheos
422428
Micah Dubinko
@@ -450,6 +456,7 @@ Narciso Jaramillo
450456
Nathan Williams
451457
ndr
452458
nerbert
459+
NetworkNode
453460
nextrevision
454461
ngn
455462
nguillaumin
@@ -469,10 +476,12 @@ Nisarg Jhaveri
469476
nlwillia
470477
noragrossman
471478
Norman Rzepka
479+
opl-
472480
Oreoluwa Onatemowo
473481
Oskar Segersvärd
474482
pablo
475483
pabloferz
484+
Pablo Zubieta
476485
Page
477486
Panupong Pasupat
478487
paris
@@ -510,13 +519,16 @@ Randall Mason
510519
Randy Burden
511520
Randy Edmunds
512521
Rasmus Erik Voel Jensen
522+
Rasmus Schultz
513523
ray ratchup
514524
Ray Ratchup
515525
Remi Nyborg
526+
Renaud Durlin
516527
Richard Denton
517528
Richard van der Meer
518529
Richard Z.H. Wang
519530
Rishi Goomar
531+
Robert Brignull
520532
Robert Crossfield
521533
Roberto Abdelkader Martínez Pérez
522534
robertop23
@@ -528,6 +540,7 @@ Ryan Petrello
528540
Ryan Prior
529541
sabaca
530542
Sam Lee
543+
Sam Rawlins
531544
Samuel Ainsworth
532545
Sam Wilson
533546
sandeepshetty
@@ -538,6 +551,7 @@ Sascha Peilicke
538551
satamas
539552
satchmorun
540553
sathyamoorthi
554+
Saul Costa
541555
S. Chris Colbert
542556
SCLINIC\jdecker
543557
Scott Aikin
@@ -551,6 +565,7 @@ shaun gilchrist
551565
Shawn A
552566
Shea Bunge
553567
sheopory
568+
Shil S
554569
Shiv Deepak
555570
Shmuel Englard
556571
Shubham Jain
@@ -635,5 +650,6 @@ Zac Anger
635650
Zachary Dremann
636651
Zeno Rocha
637652
Zhang Hao
653+
Ziv
638654
zziuni
639655
魏鹏刚

CHANGELOG.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,46 @@
1-
## 5.25.0 (2017-02-22)
1+
## 5.26.0 (2017-05-22)
2+
3+
### Bug fixes
4+
5+
In textarea-mode, don't reset the input field during composition.
6+
7+
More careful restoration of selections in widgets, during editor redraw.
8+
9+
[javascript mode](http://codemirror.net/mode/javascript/): More TypeScript parsing fixes.
10+
11+
[julia mode](http://codemirror.net/mode/julia/): Fix issue where the mode gets stuck.
12+
13+
[markdown mode](http://codemirror.net/mode/markdown/): Understand cross-line links, parse all bracketed things as links.
14+
15+
[soy mode](http://codemirror.net/mode/soy/): Support single-quoted strings.
16+
17+
[go mode](http://codemirror.net/mode/go/): Don't try to indent inside strings or comments.
18+
19+
### New features
20+
21+
[vim bindings](http://codemirror.net/mode/demo/vim.html): Parse line offsets in line or range specs.
22+
23+
## 5.25.2 (2017-04-20)
24+
25+
### Bug fixes
26+
27+
Better handling of selections that cover the whole viewport in contentEditable-mode.
28+
29+
No longer accidentally scroll the editor into view when calling `setValue`.
30+
31+
Work around Chrome Android bug when converting screen coordinates to editor positions.
32+
33+
Make sure long-clicking a selection sets a cursor and doesn't show the editor losing focus.
34+
35+
Fix issue where pointer events were incorrectly disabled on Chrome's overlay scrollbars.
36+
37+
[javascript mode](http://codemirror.net/mode/javascript/): Recognize annotations and TypeScript-style type parameters.
38+
39+
[shell mode](http://codemirror.net/mode/shell/): Handle nested braces.
40+
41+
[markdown mode](http://codemirror.net/mode/markdown/): Make parsing of strong/em delimiters CommonMark-compliant.
42+
43+
## 5.25.0 (2017-03-20)
244

345
### Bug fixes
446

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ should be asked on the
4747

4848
## Contributing code
4949

50+
Note that we are not accepting any new addons or modes into the main
51+
distribution. If you've written such a module, please distribute it as
52+
a separate NPM package.
53+
5054
- Make sure you have a [GitHub Account](https://github.com/signup/free)
5155
- Fork [CodeMirror](https://github.com/codemirror/CodeMirror/)
5256
([how to fork a repo](https://help.github.com/articles/fork-a-repo))

addon/display/panel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
Panel.prototype.changed = function(height) {
6767
var newHeight = height == null ? this.node.offsetHeight : height;
6868
var info = this.cm.state.panels;
69-
this.cm._setSize(null, info.height += (newHeight - this.height));
69+
this.cm._setSize(null, info.heightLeft -= (newHeight - this.height));
7070
this.height = newHeight;
7171
};
7272

addon/fold/indent-fold.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function lineIndent(cm, lineNo) {
1818
return -1
1919
return CodeMirror.countColumn(text, null, cm.getOption("tabSize"))
2020
}
21-
!
21+
2222
CodeMirror.registerHelper("fold", "indent", function(cm, start) {
2323
var myIndent = lineIndent(cm, start.line)
2424
if (myIndent < 0) return

addon/fold/xml-fold.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@
163163
}
164164
};
165165

166-
CodeMirror.findEnclosingTag = function(cm, pos, range) {
166+
CodeMirror.findEnclosingTag = function(cm, pos, range, tag) {
167167
var iter = new Iter(cm, pos.line, pos.ch, range);
168168
for (;;) {
169-
var open = findMatchingOpen(iter);
169+
var open = findMatchingOpen(iter, tag);
170170
if (!open) break;
171171
var forward = new Iter(cm, pos.line, pos.ch, range);
172172
var close = findMatchingClose(forward, open.tag);

addon/hint/sql-hint.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,9 @@
185185
}
186186

187187
function eachWord(lineText, f) {
188-
if (!lineText) return;
189-
var excepted = /[,;]/g;
190-
var words = lineText.split(" ");
191-
for (var i = 0; i < words.length; i++) {
192-
f(words[i]?words[i].replace(excepted, '') : '');
193-
}
188+
var words = lineText.split(/\s+/)
189+
for (var i = 0; i < words.length; i++)
190+
if (words[i]) f(words[i].replace(/[,;]/g, ''))
194191
}
195192

196193
function findTableByAlias(alias, editor) {

addon/lint/lint.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
lintAsync(cm, getAnnotations, passOptions)
142142
} else {
143143
var annotations = getAnnotations(cm.getValue(), passOptions, cm);
144+
if (!annotations) return;
144145
if (annotations.then) annotations.then(function(issues) {
145146
updateLinting(cm, issues);
146147
});

addon/search/search.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
function getSearchCursor(cm, query, pos) {
5656
// Heuristic: if the query string is all lowercase, do a case insensitive search.
57-
return cm.getSearchCursor(query, pos, queryCaseInsensitive(query));
57+
return cm.getSearchCursor(query, pos, {caseFold: queryCaseInsensitive(query), multiline: true});
5858
}
5959

6060
function persistentDialog(cm, text, deflt, onEnter, onKeyDown) {
@@ -99,7 +99,7 @@
9999
}
100100

101101
var queryDialog =
102-
'Search: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
102+
'<span class="CodeMirror-search-label">Search:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
103103

104104
function startSearch(cm, state, query) {
105105
state.queryText = query;
@@ -188,8 +188,8 @@
188188

189189
var replaceQueryDialog =
190190
' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
191-
var replacementQueryDialog = 'With: <input type="text" style="width: 10em" class="CodeMirror-search-field"/>';
192-
var doReplaceConfirm = "Replace? <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>";
191+
var replacementQueryDialog = '<span class="CodeMirror-search-label">With:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>';
192+
var doReplaceConfirm = '<span class="CodeMirror-search-label">Replace?</span> <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>';
193193

194194
function replaceAll(cm, query, text) {
195195
cm.operation(function() {
@@ -205,7 +205,7 @@
205205
function replace(cm, all) {
206206
if (cm.getOption("readOnly")) return;
207207
var query = cm.getSelection() || getSearchState(cm).lastQuery;
208-
var dialogText = all ? "Replace all:" : "Replace:"
208+
var dialogText = '<span class="CodeMirror-search-label">' + (all ? 'Replace all:' : 'Replace:') + '</span>';
209209
dialog(cm, dialogText + replaceQueryDialog, dialogText, query, function(query) {
210210
if (!query) return;
211211
query = parseQuery(query);

0 commit comments

Comments
 (0)