codemirror-rails 5.15.2 → 5.16.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8452d7d850f333131e02651f87171085c9373949
4
- data.tar.gz: 41821f0945c79008b27dbe9a9da195f1998b4c9f
3
+ metadata.gz: 83c746fe82a8c518dfd17461afa90bdf479a0719
4
+ data.tar.gz: daacf95325a4b5c2477ec6a88604ff51151daff1
5
5
  SHA512:
6
- metadata.gz: 6be7a3a6c3434c0f6ce75732429fabf3e73d19da666ec44f87503906076324c5848343bc1fd749564157dc875d33ed872ece373aadb119dea3ff1edeb3df7852
7
- data.tar.gz: f7bc70b832ff41811db9cd0b0e34a3e62c346a520b83a95edd398261053bd0f536c18f9fa901eb9dd223636f2c25bd95df9d49259e2daa8c968994ddd766a058
6
+ metadata.gz: 0b77cebfc339d3663b02c04ba6bbab443991a0bac971900536f6e832a95a4b277672db5b4d14a33b239f2418e3028487312193b89bd0a94fe5bc4caea3bd0e10
7
+ data.tar.gz: 92b748369949c77d960e5246ab284572e22b2a79bd38a24c1e86bf7e550b4ef0b5c462ec36f16ec92eadfa8d96ad44c71e7e199fac0c510fc9cba66ccbb20f10
@@ -1,6 +1,6 @@
1
1
  module Codemirror
2
2
  module Rails
3
- VERSION = '5.15.2'
4
- CODEMIRROR_VERSION = '5.15.2'
3
+ VERSION = '5.16.0'
4
+ CODEMIRROR_VERSION = '5.16.0'
5
5
  end
6
6
  end
@@ -2933,10 +2933,23 @@
2933
2933
  for (;;) {
2934
2934
  if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {
2935
2935
  var ch = x < fromX || x - fromX <= toX - x ? from : to;
2936
+ var outside = ch == from ? fromOutside : toOutside
2936
2937
  var xDiff = x - (ch == from ? fromX : toX);
2938
+ // This is a kludge to handle the case where the coordinates
2939
+ // are after a line-wrapped line. We should replace it with a
2940
+ // more general handling of cursor positions around line
2941
+ // breaks. (Issue #4078)
2942
+ if (toOutside && !bidi && !/\s/.test(lineObj.text.charAt(ch)) && xDiff > 0 &&
2943
+ ch < lineObj.text.length && preparedMeasure.view.measure.heights.length > 1) {
2944
+ var charSize = measureCharPrepared(cm, preparedMeasure, ch, "right");
2945
+ if (innerOff <= charSize.bottom && innerOff >= charSize.top && Math.abs(x - charSize.right) < xDiff) {
2946
+ outside = false
2947
+ ch++
2948
+ xDiff = x - charSize.right
2949
+ }
2950
+ }
2937
2951
  while (isExtendingChar(lineObj.text.charAt(ch))) ++ch;
2938
- var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside,
2939
- xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0);
2952
+ var pos = PosWithInfo(lineNo, ch, outside, xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0);
2940
2953
  return pos;
2941
2954
  }
2942
2955
  var step = Math.ceil(dist / 2), middle = from + step;
@@ -3660,6 +3673,7 @@
3660
3673
  // Let the drag handler handle this.
3661
3674
  if (webkit) display.scroller.draggable = true;
3662
3675
  cm.state.draggingText = dragEnd;
3676
+ dragEnd.copy = mac ? e.altKey : e.ctrlKey
3663
3677
  // IE's approach to draggable
3664
3678
  if (display.scroller.dragDrop) display.scroller.dragDrop();
3665
3679
  on(document, "mouseup", dragEnd);
@@ -3890,7 +3904,7 @@
3890
3904
  try {
3891
3905
  var text = e.dataTransfer.getData("Text");
3892
3906
  if (text) {
3893
- if (cm.state.draggingText && !(mac ? e.altKey : e.ctrlKey))
3907
+ if (cm.state.draggingText && !cm.state.draggingText.copy)
3894
3908
  var selected = cm.listSelections();
3895
3909
  setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
3896
3910
  if (selected) for (var i = 0; i < selected.length; ++i)
@@ -8902,7 +8916,7 @@
8902
8916
 
8903
8917
  // THE END
8904
8918
 
8905
- CodeMirror.version = "5.15.2";
8919
+ CodeMirror.version = "5.16.0";
8906
8920
 
8907
8921
  return CodeMirror;
8908
8922
  });
@@ -11,30 +11,26 @@
11
11
  })(function(CodeMirror) {
12
12
  "use strict";
13
13
 
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)
18
19
  }
19
20
  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)
22
25
  }
23
26
  });
24
27
 
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 = ""
34
30
  var val = cm.getOption("rulers");
35
31
  var cw = cm.defaultCharWidth();
36
32
  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";
38
34
  for (var i = 0; i < val.length; i++) {
39
35
  var elt = document.createElement("div");
40
36
  elt.className = "CodeMirror-ruler";
@@ -49,15 +45,7 @@
49
45
  if (conf.width) elt.style.borderLeftWidth = conf.width;
50
46
  }
51
47
  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)
56
49
  }
57
50
  }
58
-
59
- function refreshRulers(cm) {
60
- clearRulers(cm);
61
- setRulers(cm);
62
- }
63
51
  });
@@ -29,7 +29,7 @@ CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {
29
29
  }
30
30
  if (pass == 1 && found < start.ch) return;
31
31
  if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1))) &&
32
- (lineText.slice(found - endToken.length, found) == endToken ||
32
+ (found == 0 || lineText.slice(found - endToken.length, found) == endToken ||
33
33
  !/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found))))) {
34
34
  startCh = found + startToken.length;
35
35
  break;
@@ -49,7 +49,7 @@
49
49
  });
50
50
  var myRange = cm.markText(range.from, range.to, {
51
51
  replacedWith: myWidget,
52
- clearOnEnter: true,
52
+ clearOnEnter: getOption(cm, options, "clearOnEnter"),
53
53
  __isFold: true
54
54
  });
55
55
  myRange.on("clear", function(from, to) {
@@ -129,7 +129,8 @@
129
129
  rangeFinder: CodeMirror.fold.auto,
130
130
  widget: "\u2194",
131
131
  minFoldSize: 0,
132
- scanUp: false
132
+ scanUp: false,
133
+ clearOnEnter: true
133
134
  };
134
135
 
135
136
  CodeMirror.defineOption("foldOptions", null);
@@ -50,7 +50,7 @@
50
50
  }
51
51
 
52
52
  function isFolded(cm, line) {
53
- var marks = cm.findMarksAt(Pos(line));
53
+ var marks = cm.findMarks(Pos(line, 0), Pos(line + 1, 0));
54
54
  for (var i = 0; i < marks.length; ++i)
55
55
  if (marks[i].__isFold && marks[i].find().from.line == line) return marks[i];
56
56
  }
@@ -229,6 +229,7 @@
229
229
  var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight);
230
230
  (completion.options.container || document.body).appendChild(hints);
231
231
  var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH;
232
+ var scrolls = hints.scrollHeight > hints.clientHeight + 1
232
233
  if (overlapY > 0) {
233
234
  var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top);
234
235
  if (curTop - height > 0) { // Fits above cursor
@@ -253,6 +254,8 @@
253
254
  }
254
255
  hints.style.left = (left = pos.left - overlapX) + "px";
255
256
  }
257
+ if (scrolls) for (var node = hints.firstChild; node; node = node.nextSibling)
258
+ node.style.paddingRight = cm.display.nativeBarWidth + "px"
256
259
 
257
260
  cm.addKeyMap(this.keyMap = buildKeyMap(completion, {
258
261
  moveFocus: function(n, avoidWrap) { widget.changeActive(widget.selectedHint + n, avoidWrap); },
@@ -18,7 +18,7 @@
18
18
  QUERY_DIV: ";",
19
19
  ALIAS_KEYWORD: "AS"
20
20
  };
21
- var Pos = CodeMirror.Pos;
21
+ var Pos = CodeMirror.Pos, cmpPos = CodeMirror.cmpPos;
22
22
 
23
23
  function isArray(val) { return Object.prototype.toString.call(val) == "[object Array]" }
24
24
 
@@ -178,15 +178,6 @@
178
178
  }
179
179
  }
180
180
 
181
- function convertCurToNumber(cur) {
182
- // max characters of a line is 999,999.
183
- return cur.line + cur.ch / Math.pow(10, 6);
184
- }
185
-
186
- function convertNumberToCur(num) {
187
- return Pos(Math.floor(num), +num.toString().split('.').pop());
188
- }
189
-
190
181
  function findTableByAlias(alias, editor) {
191
182
  var doc = editor.doc;
192
183
  var fullQuery = doc.getValue();
@@ -209,15 +200,14 @@
209
200
  separator.push(Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).text.length));
210
201
 
211
202
  //find valid range
212
- var prevItem = 0;
213
- var current = convertCurToNumber(editor.getCursor());
203
+ var prevItem = null;
204
+ var current = editor.getCursor()
214
205
  for (var i = 0; i < separator.length; i++) {
215
- var _v = convertCurToNumber(separator[i]);
216
- if (current > prevItem && current <= _v) {
217
- validRange = { start: convertNumberToCur(prevItem), end: convertNumberToCur(_v) };
206
+ if ((prevItem == null || cmpPos(current, prevItem) > 0) && cmpPos(current, separator[i]) <= 0) {
207
+ validRange = {start: prevItem, end: separator[i]};
218
208
  break;
219
209
  }
220
- prevItem = _v;
210
+ prevItem = separator[i];
221
211
  }
222
212
 
223
213
  var query = doc.getRange(validRange.start, validRange.end, false);
@@ -40,7 +40,9 @@
40
40
  if (cm.state.scrollPastEndPadding != padding) {
41
41
  cm.state.scrollPastEndPadding = padding;
42
42
  cm.display.lineSpace.parentNode.style.paddingBottom = padding;
43
+ cm.off("refresh", updateBottomMargin);
43
44
  cm.setSize();
45
+ cm.on("refresh", updateBottomMargin);
44
46
  }
45
47
  }
46
48
  });
@@ -57,12 +57,13 @@
57
57
  return cm.getSearchCursor(query, pos, queryCaseInsensitive(query));
58
58
  }
59
59
 
60
- function persistentDialog(cm, text, deflt, f) {
61
- cm.openDialog(text, f, {
60
+ function persistentDialog(cm, text, deflt, onEnter, onKeyDown) {
61
+ cm.openDialog(text, onEnter, {
62
62
  value: deflt,
63
63
  selectValueOnOpen: true,
64
64
  closeOnEnter: false,
65
- onClose: function() { clearSearch(cm); }
65
+ onClose: function() { clearSearch(cm); },
66
+ onKeyDown: onKeyDown
66
67
  });
67
68
  }
68
69
 
@@ -112,13 +113,13 @@
112
113
  }
113
114
  }
114
115
 
115
- function doSearch(cm, rev, persistent) {
116
+ function doSearch(cm, rev, persistent, immediate) {
116
117
  var state = getSearchState(cm);
117
118
  if (state.query) return findNext(cm, rev);
118
119
  var q = cm.getSelection() || state.lastQuery;
119
120
  if (persistent && cm.openDialog) {
120
121
  var hiding = null
121
- persistentDialog(cm, queryDialog, q, function(query, event) {
122
+ var searchNext = function(query, event) {
122
123
  CodeMirror.e_stop(event);
123
124
  if (!query) return;
124
125
  if (query != state.queryText) {
@@ -133,7 +134,22 @@
133
134
  dialog.getBoundingClientRect().bottom - 4 > cm.cursorCoords(to, "window").top)
134
135
  (hiding = dialog).style.opacity = .4
135
136
  })
137
+ };
138
+ persistentDialog(cm, queryDialog, q, searchNext, function(event, query) {
139
+ var cmd = CodeMirror.keyMap[cm.getOption("keyMap")][CodeMirror.keyName(event)];
140
+ if (cmd == "findNext" || cmd == "findPrev") {
141
+ CodeMirror.e_stop(event);
142
+ startSearch(cm, getSearchState(cm), query);
143
+ cm.execCommand(cmd);
144
+ } else if (cmd == "find" || cmd == "findPersistent") {
145
+ CodeMirror.e_stop(event);
146
+ searchNext(query, event);
147
+ }
136
148
  });
149
+ if (immediate) {
150
+ startSearch(cm, state, q);
151
+ findNext(cm, rev);
152
+ }
137
153
  } else {
138
154
  dialog(cm, queryDialog, "Search for:", q, function(query) {
139
155
  if (query && !state.query) cm.operation(function() {
@@ -223,6 +239,8 @@
223
239
 
224
240
  CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);};
225
241
  CodeMirror.commands.findPersistent = function(cm) {clearSearch(cm); doSearch(cm, false, true);};
242
+ CodeMirror.commands.findPersistentNext = function(cm) {doSearch(cm, false, true, true);};
243
+ CodeMirror.commands.findPersistentPrev = function(cm) {doSearch(cm, true, true, true);};
226
244
  CodeMirror.commands.findNext = doSearch;
227
245
  CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);};
228
246
  CodeMirror.commands.clearSearch = clearSearch;
@@ -30,7 +30,9 @@
30
30
  }
31
31
 
32
32
  function findBreakPoint(text, column, wrapOn, killTrailingSpace) {
33
- for (var at = column; at > 0; --at)
33
+ var at = column
34
+ while (at < text.length && text.charAt(at) == " ") at++
35
+ for (; at > 0; --at)
34
36
  if (wrapOn.test(text.slice(at - 1, at + 1))) break;
35
37
  for (var first = true;; first = false) {
36
38
  var endOfText = at;
@@ -420,6 +420,34 @@
420
420
 
421
421
  map[cK + ctrl + "Backspace"] = "delLineLeft";
422
422
 
423
+ cmds[map["Backspace"] = "smartBackspace"] = function(cm) {
424
+ if (cm.somethingSelected()) return CodeMirror.Pass;
425
+
426
+ cm.operation(function() {
427
+ var cursors = cm.listSelections();
428
+ var indentUnit = cm.getOption("indentUnit");
429
+
430
+ for (var i = cursors.length - 1; i >= 0; i--) {
431
+ var cursor = cursors[i].head;
432
+ var toStartOfLine = cm.getRange({line: cursor.line, ch: 0}, cursor);
433
+ var column = CodeMirror.countColumn(toStartOfLine, null, cm.getOption("tabSize"));
434
+
435
+ // Delete by one character by default
436
+ var deletePos = cm.findPosH(cursor, -1, "char", false);
437
+
438
+ if (toStartOfLine && !/\S/.test(toStartOfLine) && column % indentUnit == 0) {
439
+ var prevIndent = new Pos(cursor.line,
440
+ CodeMirror.findColumn(toStartOfLine, column - indentUnit, indentUnit));
441
+
442
+ // Smart delete only if we found a valid prevIndent location
443
+ if (prevIndent.ch != cursor.ch) deletePos = prevIndent;
444
+ }
445
+
446
+ cm.replaceRange("", deletePos, cursor, "+delete");
447
+ }
448
+ });
449
+ };
450
+
423
451
  cmds[map[cK + ctrl + "K"] = "delLineRight"] = function(cm) {
424
452
  cm.operation(function() {
425
453
  var ranges = cm.listSelections();
@@ -472,7 +500,8 @@
472
500
  cm.scrollTo(null, (pos.top + pos.bottom) / 2 - cm.getScrollInfo().clientHeight / 2);
473
501
  };
474
502
 
475
- cmds[map["Shift-Alt-Up"] = "selectLinesUpward"] = function(cm) {
503
+ var selectLinesCombo = mac ? "Ctrl-Shift-" : "Ctrl-Alt-";
504
+ cmds[map[selectLinesCombo + "Up"] = "selectLinesUpward"] = function(cm) {
476
505
  cm.operation(function() {
477
506
  var ranges = cm.listSelections();
478
507
  for (var i = 0; i < ranges.length; i++) {
@@ -482,7 +511,7 @@
482
511
  }
483
512
  });
484
513
  };
485
- cmds[map["Shift-Alt-Down"] = "selectLinesDownward"] = function(cm) {
514
+ cmds[map[selectLinesCombo + "Down"] = "selectLinesDownward"] = function(cm) {
486
515
  cm.operation(function() {
487
516
  var ranges = cm.listSelections();
488
517
  for (var i = 0; i < ranges.length; i++) {
@@ -23,7 +23,7 @@ CodeMirror.defineMode("go", function(config) {
23
23
  "bool":true, "byte":true, "complex64":true, "complex128":true,
24
24
  "float32":true, "float64":true, "int8":true, "int16":true, "int32":true,
25
25
  "int64":true, "string":true, "uint8":true, "uint16":true, "uint32":true,
26
- "uint64":true, "int":true, "uint":true, "uintptr":true
26
+ "uint64":true, "int":true, "uint":true, "uintptr":true, "error": true
27
27
  };
28
28
 
29
29
  var atoms = {
@@ -121,10 +121,11 @@
121
121
  return tokenUntil(stream, state, /\{\/literal}/);
122
122
 
123
123
  case "string":
124
- if (stream.match(/^.*?"/)) {
125
- state.soyState.pop();
126
- } else {
124
+ var match = stream.match(/^.*?("|\\[\s\S])/);
125
+ if (!match) {
127
126
  stream.skipToEnd();
127
+ } else if (match[1] == "\"") {
128
+ state.soyState.pop();
128
129
  }
129
130
  return "string";
130
131
  }
@@ -366,9 +366,9 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
366
366
  // http://www.postgresql.org/docs/9.5/static/datatype.html
367
367
  builtin: set("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),
368
368
  atoms: set("false true null unknown"),
369
- operatorChars: /^[*+\-%<>!=&|^]/,
369
+ operatorChars: /^[*+\-%<>!=&|^\/#@?~]/,
370
370
  dateSQL: set("date time timestamp"),
371
- support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast commentHash commentSpaceRequired")
371
+ support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")
372
372
  });
373
373
 
374
374
  // Google's SQL-like query language, GQL
@@ -88,8 +88,14 @@
88
88
 
89
89
  .cm-tab { display: inline-block; text-decoration: inherit; }
90
90
 
91
+ .CodeMirror-rulers {
92
+ position: absolute;
93
+ left: 0; right: 0; top: -50px; bottom: -20px;
94
+ overflow: hidden;
95
+ }
91
96
  .CodeMirror-ruler {
92
97
  border-left: 1px solid #ccc;
98
+ top: 0; bottom: 0;
93
99
  position: absolute;
94
100
  }
95
101
 
@@ -291,7 +297,10 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
291
297
  visibility: hidden;
292
298
  }
293
299
 
294
- .CodeMirror-cursor { position: absolute; }
300
+ .CodeMirror-cursor {
301
+ position: absolute;
302
+ pointer-events: none;
303
+ }
295
304
  .CodeMirror-measure pre { position: static; }
296
305
 
297
306
  div.CodeMirror-cursors {
@@ -16,6 +16,7 @@
16
16
  background: white;
17
17
  font-size: 90%;
18
18
  font-family: monospace;
19
+ max-width: 19em;
19
20
 
20
21
  max-height: 20em;
21
22
  overflow-y: auto;
@@ -25,8 +26,6 @@
25
26
  margin: 0;
26
27
  padding: 0 4px;
27
28
  border-radius: 2px;
28
- max-width: 19em;
29
- overflow: hidden;
30
29
  white-space: pre;
31
30
  color: black;
32
31
  cursor: pointer;
@@ -4,7 +4,7 @@ http://ethanschoonover.com/solarized
4
4
  */
5
5
 
6
6
  /*
7
- Solarized color pallet
7
+ Solarized color palette
8
8
  http://ethanschoonover.com/solarized/img/solarized-palette.png
9
9
  */
10
10
 
@@ -34,7 +34,7 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png
34
34
  }
35
35
  .cm-s-solarized.cm-s-dark {
36
36
  color: #839496;
37
- background-color: #002b36;
37
+ background-color: #002b36;
38
38
  text-shadow: #002b36 0 1px;
39
39
  }
40
40
  .cm-s-solarized.cm-s-light {
@@ -113,32 +113,34 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png
113
113
  box-shadow: inset 7px 0 12px -6px #000;
114
114
  }
115
115
 
116
- /* Gutter border and some shadow from it */
116
+ /* Remove gutter border */
117
117
  .cm-s-solarized .CodeMirror-gutters {
118
- border-right: 1px solid;
118
+ border-right: 0;
119
119
  }
120
120
 
121
121
  /* Gutter colors and line number styling based of color scheme (dark / light) */
122
122
 
123
123
  /* Dark */
124
124
  .cm-s-solarized.cm-s-dark .CodeMirror-gutters {
125
- background-color: #002b36;
126
- border-color: #00232c;
125
+ background-color: #073642;
127
126
  }
128
127
 
129
128
  .cm-s-solarized.cm-s-dark .CodeMirror-linenumber {
129
+ color: #586e75;
130
130
  text-shadow: #021014 0 -1px;
131
131
  }
132
132
 
133
133
  /* Light */
134
134
  .cm-s-solarized.cm-s-light .CodeMirror-gutters {
135
- background-color: #fdf6e3;
136
- border-color: #eee8d5;
135
+ background-color: #eee8d5;
136
+ }
137
+
138
+ .cm-s-solarized.cm-s-light .CodeMirror-linenumber {
139
+ color: #839496;
137
140
  }
138
141
 
139
142
  /* Common */
140
143
  .cm-s-solarized .CodeMirror-linenumber {
141
- color: #586e75;
142
144
  padding: 0 5px;
143
145
  }
144
146
  .cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; }
@@ -149,15 +151,19 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png
149
151
  color: #586e75;
150
152
  }
151
153
 
154
+ /* Cursor */
152
155
  .cm-s-solarized .CodeMirror-cursor { border-left: 1px solid #819090; }
153
156
 
154
- /*
155
- Active line. Negative margin compensates left padding of the text in the
156
- view-port
157
- */
157
+ /* Fat cursor */
158
+ .cm-s-solarized.cm-s-light.cm-fat-cursor .CodeMirror-cursor { background: #fdf6e3; }
159
+ .cm-s-solarized.cm-s-light .cm-animate-fat-cursor { background-color: #fdf6e3; }
160
+ .cm-s-solarized.cm-s-dark.cm-fat-cursor .CodeMirror-cursor { background: #586e75; }
161
+ .cm-s-solarized.cm-s-dark .cm-animate-fat-cursor { background-color: #586e75; }
162
+
163
+ /* Active line */
158
164
  .cm-s-solarized.cm-s-dark .CodeMirror-activeline-background {
159
- background: rgba(255, 255, 255, 0.10);
165
+ background: rgba(255, 255, 255, 0.06);
160
166
  }
161
167
  .cm-s-solarized.cm-s-light .CodeMirror-activeline-background {
162
- background: rgba(0, 0, 0, 0.10);
168
+ background: rgba(0, 0, 0, 0.06);
163
169
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codemirror-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.15.2
4
+ version: 5.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Fixler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-02 00:00:00.000000000 Z
11
+ date: 2016-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties