ace-rails-ap 4.0.1 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ace/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/ace/ace.js +187 -175
  4. data/vendor/assets/javascripts/ace/ext-chromevox.js +5 -5
  5. data/vendor/assets/javascripts/ace/ext-emmet.js +4 -5
  6. data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +1 -1
  7. data/vendor/assets/javascripts/ace/ext-language_tools.js +23 -22
  8. data/vendor/assets/javascripts/ace/ext-modelist.js +11 -5
  9. data/vendor/assets/javascripts/ace/ext-settings_menu.js +13 -7
  10. data/vendor/assets/javascripts/ace/ext-textarea.js +0 -72
  11. data/vendor/assets/javascripts/ace/keybinding-emacs.js +3 -2
  12. data/vendor/assets/javascripts/ace/keybinding-vim.js +23 -18
  13. data/vendor/assets/javascripts/ace/mode-abap.js +3 -19
  14. data/vendor/assets/javascripts/ace/mode-c_cpp.js +21 -29
  15. data/vendor/assets/javascripts/ace/mode-cirru.js +15 -15
  16. data/vendor/assets/javascripts/ace/mode-coffee.js +3 -22
  17. data/vendor/assets/javascripts/ace/mode-coldfusion.js +40 -54
  18. data/vendor/assets/javascripts/ace/mode-csharp.js +6 -0
  19. data/vendor/assets/javascripts/ace/mode-css.js +3 -3
  20. data/vendor/assets/javascripts/ace/mode-curly.js +40 -54
  21. data/vendor/assets/javascripts/ace/mode-dart.js +21 -29
  22. data/vendor/assets/javascripts/ace/mode-django.js +40 -54
  23. data/vendor/assets/javascripts/ace/mode-eiffel.js +2 -2
  24. data/vendor/assets/javascripts/ace/mode-ejs.js +41 -55
  25. data/vendor/assets/javascripts/ace/mode-elm.js +3 -3
  26. data/vendor/assets/javascripts/ace/mode-ftl.js +36 -50
  27. data/vendor/assets/javascripts/ace/mode-gherkin.js +6 -6
  28. data/vendor/assets/javascripts/ace/mode-glsl.js +21 -29
  29. data/vendor/assets/javascripts/ace/mode-gobstones.js +1273 -0
  30. data/vendor/assets/javascripts/ace/mode-golang.js +2 -2
  31. data/vendor/assets/javascripts/ace/mode-groovy.js +33 -47
  32. data/vendor/assets/javascripts/ace/mode-haml.js +981 -27
  33. data/vendor/assets/javascripts/ace/mode-handlebars.js +40 -54
  34. data/vendor/assets/javascripts/ace/mode-html.js +40 -54
  35. data/vendor/assets/javascripts/ace/mode-html_elixir.js +40 -54
  36. data/vendor/assets/javascripts/ace/mode-html_ruby.js +41 -55
  37. data/vendor/assets/javascripts/ace/mode-jade.js +83 -189
  38. data/vendor/assets/javascripts/ace/mode-java.js +35 -49
  39. data/vendor/assets/javascripts/ace/mode-javascript.js +33 -47
  40. data/vendor/assets/javascripts/ace/mode-jsp.js +38 -52
  41. data/vendor/assets/javascripts/ace/mode-lean.js +1 -1
  42. data/vendor/assets/javascripts/ace/mode-less.js +368 -136
  43. data/vendor/assets/javascripts/ace/mode-liquid.js +36 -50
  44. data/vendor/assets/javascripts/ace/mode-livescript.js +3 -18
  45. data/vendor/assets/javascripts/ace/mode-logiql.js +11 -11
  46. data/vendor/assets/javascripts/ace/mode-lua.js +1 -4
  47. data/vendor/assets/javascripts/ace/mode-luapage.js +41 -58
  48. data/vendor/assets/javascripts/ace/mode-markdown.js +40 -54
  49. data/vendor/assets/javascripts/ace/mode-mask.js +36 -50
  50. data/vendor/assets/javascripts/ace/mode-matlab.js +1 -1
  51. data/vendor/assets/javascripts/ace/mode-mel.js +1 -1
  52. data/vendor/assets/javascripts/ace/mode-nix.js +21 -29
  53. data/vendor/assets/javascripts/ace/mode-nsis.js +304 -0
  54. data/vendor/assets/javascripts/ace/mode-objectivec.js +21 -29
  55. data/vendor/assets/javascripts/ace/mode-pascal.js +1 -1
  56. data/vendor/assets/javascripts/ace/mode-pgsql.js +33 -47
  57. data/vendor/assets/javascripts/ace/mode-php.js +42 -57
  58. data/vendor/assets/javascripts/ace/mode-powershell.js +86 -57
  59. data/vendor/assets/javascripts/ace/mode-praat.js +1 -1
  60. data/vendor/assets/javascripts/ace/mode-protobuf.js +21 -29
  61. data/vendor/assets/javascripts/ace/mode-r.js +20 -20
  62. data/vendor/assets/javascripts/ace/mode-razor.js +3136 -0
  63. data/vendor/assets/javascripts/ace/mode-rdoc.js +20 -20
  64. data/vendor/assets/javascripts/ace/mode-rhtml.js +60 -74
  65. data/vendor/assets/javascripts/ace/mode-rst.js +249 -0
  66. data/vendor/assets/javascripts/ace/mode-ruby.js +1 -1
  67. data/vendor/assets/javascripts/ace/mode-rust.js +4 -8
  68. data/vendor/assets/javascripts/ace/mode-scala.js +33 -47
  69. data/vendor/assets/javascripts/ace/mode-sjs.js +42 -56
  70. data/vendor/assets/javascripts/ace/mode-smarty.js +40 -54
  71. data/vendor/assets/javascripts/ace/mode-soy_template.js +41 -55
  72. data/vendor/assets/javascripts/ace/mode-sqlserver.js +3 -3
  73. data/vendor/assets/javascripts/ace/mode-stylus.js +1 -1
  74. data/vendor/assets/javascripts/ace/mode-svg.js +34 -48
  75. data/vendor/assets/javascripts/ace/mode-swift.js +5 -5
  76. data/vendor/assets/javascripts/ace/mode-tex.js +24 -24
  77. data/vendor/assets/javascripts/ace/mode-twig.js +40 -54
  78. data/vendor/assets/javascripts/ace/mode-typescript.js +33 -47
  79. data/vendor/assets/javascripts/ace/mode-velocity.js +40 -54
  80. data/vendor/assets/javascripts/ace/mode-vhdl.js +2 -2
  81. data/vendor/assets/javascripts/ace/mode-wollok.js +1256 -0
  82. data/vendor/assets/javascripts/ace/mode-xml.js +1 -1
  83. data/vendor/assets/javascripts/ace/worker-coffee.js +1 -1
  84. data/vendor/assets/javascripts/ace/worker-css.js +1 -1
  85. data/vendor/assets/javascripts/ace/worker-html.js +2 -2
  86. data/vendor/assets/javascripts/ace/worker-javascript.js +1 -1
  87. data/vendor/assets/javascripts/ace/worker-json.js +1 -1
  88. data/vendor/assets/javascripts/ace/worker-lua.js +1 -1
  89. data/vendor/assets/javascripts/ace/worker-php.js +2 -4
  90. data/vendor/assets/javascripts/ace/worker-xml.js +1 -1
  91. data/vendor/assets/javascripts/ace/worker-xquery.js +1 -1
  92. metadata +8 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28dce068cc2132409a6445f5fb148232533f89de
4
- data.tar.gz: 632ed3cae729c07467d21eb223e2c02359ecc4ca
3
+ metadata.gz: 8192dcb30d1d6d1a71a923f70f1df01298481610
4
+ data.tar.gz: b215929038eafedb1002945cda5911c575f9225f
5
5
  SHA512:
6
- metadata.gz: 4429069a802d350b6efaec8608a1f0657f26c5cfc91a7aec7e90293225f1074973198c636bacbac67171ede01c1a6ae3892f08ee4b9f0387b67d73d713a99892
7
- data.tar.gz: fadb7628da20b7602623eba1b5bea2578f3f8cd05ae01178fd5cb4f9c3fc8c6ad9fd4ce6d569b7fb782b65b7c7cb9a87207941b52ee36580486e0d910d71954f
6
+ metadata.gz: 28e248efecbd78c0f27be9149965d35c06aaa04bf4a3d96cf5a1f3c4e93f01450911705ea8657ca2b219178fd99f8bcb48d6c6170a06dc51de8d979b89b43e95
7
+ data.tar.gz: 800f8749652f1851ae227b8c199b3d9dc827c9c7ebd990c9e62231be76afc448c207fe8d668c10d4ca25a6a93011ef8b43ba1cba399d9eb0ee05aaf47f798b0b
@@ -1,5 +1,5 @@
1
1
  module Ace
2
2
  module Rails
3
- VERSION = "4.0.1"
3
+ VERSION = "4.0.2"
4
4
  end
5
5
  end
@@ -1522,7 +1522,7 @@ exports.addMouseWheelListener = function(el, callback) {
1522
1522
  }
1523
1523
  };
1524
1524
 
1525
- exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbackName) {
1525
+ exports.addMultiMouseDownListener = function(elements, timeouts, eventHandler, callbackName) {
1526
1526
  var clicks = 0;
1527
1527
  var startX, startY, timer;
1528
1528
  var eventNames = {
@@ -1531,7 +1531,7 @@ exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbac
1531
1531
  4: "quadclick"
1532
1532
  };
1533
1533
 
1534
- exports.addListener(el, "mousedown", function(e) {
1534
+ function onMousedown(e) {
1535
1535
  if (exports.getButton(e) !== 0) {
1536
1536
  clicks = 0;
1537
1537
  } else if (e.detail > 1) {
@@ -1563,18 +1563,22 @@ exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbac
1563
1563
  clicks = 0;
1564
1564
  else if (clicks > 1)
1565
1565
  return eventHandler[callbackName](eventNames[clicks], e);
1566
- });
1567
-
1568
- if (useragent.isOldIE) {
1569
- exports.addListener(el, "dblclick", function(e) {
1570
- clicks = 2;
1571
- if (timer)
1572
- clearTimeout(timer);
1573
- timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600);
1574
- eventHandler[callbackName]("mousedown", e);
1575
- eventHandler[callbackName](eventNames[clicks], e);
1576
- });
1577
1566
  }
1567
+ function onDblclick(e) {
1568
+ clicks = 2;
1569
+ if (timer)
1570
+ clearTimeout(timer);
1571
+ timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600);
1572
+ eventHandler[callbackName]("mousedown", e);
1573
+ eventHandler[callbackName](eventNames[clicks], e);
1574
+ }
1575
+ if (!Array.isArray(elements))
1576
+ elements = [elements];
1577
+ elements.forEach(function(el) {
1578
+ exports.addListener(el, "mousedown", onMousedown);
1579
+ if (useragent.isOldIE)
1580
+ exports.addListener(el, "dblclick", onDblclick);
1581
+ });
1578
1582
  };
1579
1583
 
1580
1584
  var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent" in window)
@@ -1617,8 +1621,7 @@ function normalizeCommandKeys(callback, e, keyCode) {
1617
1621
  if (keyCode in keys.MODIFIER_KEYS) {
1618
1622
  keyCode = -1;
1619
1623
  }
1620
-
1621
- if (hashId & 8 && (keyCode === 91 || keyCode === 92)) {
1624
+ if (hashId & 8 && (keyCode >= 91 && keyCode <= 93)) {
1622
1625
  keyCode = -1;
1623
1626
  }
1624
1627
 
@@ -1977,11 +1980,11 @@ var TextInput = function(parentNode, host) {
1977
1980
  if (tempStyle) return text.focus();
1978
1981
  var top = text.style.top;
1979
1982
  text.style.position = "fixed";
1980
- text.style.top = "-1000px";
1983
+ text.style.top = "0px";
1981
1984
  text.focus();
1982
1985
  setTimeout(function() {
1983
1986
  text.style.position = "";
1984
- if (text.style.top == "-1000px")
1987
+ if (text.style.top == "0px")
1985
1988
  text.style.top = top;
1986
1989
  }, 0);
1987
1990
  };
@@ -2351,6 +2354,8 @@ var TextInput = function(parentNode, host) {
2351
2354
 
2352
2355
  if (host.renderer.$keepTextAreaAtCursor)
2353
2356
  host.renderer.$keepTextAreaAtCursor = null;
2357
+
2358
+ clearTimeout(closeTimeout);
2354
2359
  if (useragent.isWin && !useragent.isOldIE)
2355
2360
  event.capture(host.container, move, onContextMenuClose);
2356
2361
  };
@@ -2375,6 +2380,11 @@ var TextInput = function(parentNode, host) {
2375
2380
  host.textInput.onContextMenu(e);
2376
2381
  onContextMenuClose();
2377
2382
  };
2383
+ event.addListener(text, "mouseup", onContextMenu);
2384
+ event.addListener(text, "mousedown", function(e) {
2385
+ e.preventDefault();
2386
+ onContextMenuClose();
2387
+ });
2378
2388
  event.addListener(host.renderer.scroller, "contextmenu", onContextMenu);
2379
2389
  event.addListener(text, "contextmenu", onContextMenu);
2380
2390
  };
@@ -2426,10 +2436,11 @@ function DefaultHandlers(mouseHandler) {
2426
2436
  var selectionRange = editor.getSelectionRange();
2427
2437
  var selectionEmpty = selectionRange.isEmpty();
2428
2438
  editor.$blockScrolling++;
2429
- if (selectionEmpty)
2439
+ if (selectionEmpty || button == 1)
2430
2440
  editor.selection.moveToPosition(pos);
2431
2441
  editor.$blockScrolling--;
2432
- editor.textInput.onContextMenu(ev.domEvent);
2442
+ if (button == 2)
2443
+ editor.textInput.onContextMenu(ev.domEvent);
2433
2444
  return; // stopping event here breaks contextmenu on ff mac
2434
2445
  }
2435
2446
 
@@ -3708,11 +3719,11 @@ exports.loadModule = function(moduleName, onLoad) {
3708
3719
  };
3709
3720
  init(true);function init(packaged) {
3710
3721
 
3722
+ if (!global || !global.document)
3723
+ return;
3724
+
3711
3725
  options.packaged = packaged || require.packaged || module.packaged || (global.define && define.packaged);
3712
3726
 
3713
- if (!global.document)
3714
- return "";
3715
-
3716
3727
  var scriptOptions = {};
3717
3728
  var scriptUrl = "";
3718
3729
  var currentScript = (document.currentScript || document._currentScript ); // native or polyfill
@@ -3753,7 +3764,7 @@ init(true);function init(packaged) {
3753
3764
  for (var key in scriptOptions)
3754
3765
  if (typeof scriptOptions[key] !== "undefined")
3755
3766
  exports.set(key, scriptOptions[key]);
3756
- };
3767
+ }
3757
3768
 
3758
3769
  exports.init = init;
3759
3770
 
@@ -3783,25 +3794,22 @@ var MouseHandler = function(editor) {
3783
3794
  new DragdropHandler(this);
3784
3795
 
3785
3796
  var focusEditor = function(e) {
3786
- if (!document.hasFocus || !document.hasFocus())
3797
+ var windowBlurred = !document.hasFocus || !document.hasFocus()
3798
+ || !editor.isFocused() && document.activeElement == (editor.textInput && editor.textInput.getElement())
3799
+ if (windowBlurred)
3787
3800
  window.focus();
3788
3801
  editor.focus();
3789
- if (!editor.isFocused())
3790
- window.focus();
3791
3802
  };
3792
3803
 
3793
3804
  var mouseTarget = editor.renderer.getMouseEventTarget();
3794
3805
  event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
3795
3806
  event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
3796
- event.addMultiMouseDownListener(mouseTarget, [400, 300, 250], this, "onMouseEvent");
3797
- if (editor.renderer.scrollBarV) {
3798
- event.addMultiMouseDownListener(editor.renderer.scrollBarV.inner, [400, 300, 250], this, "onMouseEvent");
3799
- event.addMultiMouseDownListener(editor.renderer.scrollBarH.inner, [400, 300, 250], this, "onMouseEvent");
3800
- if (useragent.isIE) {
3801
- event.addListener(editor.renderer.scrollBarV.element, "mousedown", focusEditor);
3802
- event.addListener(editor.renderer.scrollBarH.element, "mousedown", focusEditor);
3803
- }
3804
- }
3807
+ event.addMultiMouseDownListener([
3808
+ mouseTarget,
3809
+ editor.renderer.scrollBarV && editor.renderer.scrollBarV.inner,
3810
+ editor.renderer.scrollBarH && editor.renderer.scrollBarH.inner,
3811
+ editor.textInput && editor.textInput.getElement()
3812
+ ].filter(Boolean), [400, 300, 250], this, "onMouseEvent");
3805
3813
  event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
3806
3814
  event.addTouchMoveListener(editor.container, this.onTouchMove.bind(this, "touchmove"));
3807
3815
 
@@ -3812,11 +3820,11 @@ var MouseHandler = function(editor) {
3812
3820
  event.addListener(gutterEl, "mousemove", this.onMouseEvent.bind(this, "guttermousemove"));
3813
3821
 
3814
3822
  event.addListener(mouseTarget, "mousedown", focusEditor);
3815
-
3816
- event.addListener(gutterEl, "mousedown", function(e) {
3817
- editor.focus();
3818
- return event.preventDefault(e);
3819
- });
3823
+ event.addListener(gutterEl, "mousedown", focusEditor);
3824
+ if (useragent.isIE && editor.renderer.scrollBarV) {
3825
+ event.addListener(editor.renderer.scrollBarV.element, "mousedown", focusEditor);
3826
+ event.addListener(editor.renderer.scrollBarH.element, "mousedown", focusEditor);
3827
+ }
3820
3828
 
3821
3829
  editor.on("mousemove", function(e){
3822
3830
  if (_self.state || _self.$dragDelay || !_self.$dragEnabled)
@@ -4253,7 +4261,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
4253
4261
  if (!this.isMultiLine()) {
4254
4262
  if (row === this.start.row) {
4255
4263
  return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
4256
- };
4264
+ }
4257
4265
  }
4258
4266
 
4259
4267
  if (row < this.start.row)
@@ -4856,8 +4864,10 @@ var Selection = function(session) {
4856
4864
  var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column);
4857
4865
 
4858
4866
  if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) {
4859
- if (this.session.lineWidgets && this.session.lineWidgets[docPos.row])
4860
- docPos.row++;
4867
+ if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) {
4868
+ if (docPos.row > 0 || rows > 0)
4869
+ docPos.row++;
4870
+ }
4861
4871
  }
4862
4872
  this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);
4863
4873
  };
@@ -4911,7 +4921,7 @@ var Selection = function(session) {
4911
4921
  this.getRangeOfMovements = function(func) {
4912
4922
  var start = this.getCursor();
4913
4923
  try {
4914
- func.call(null, this);
4924
+ func(this);
4915
4925
  var end = this.getCursor();
4916
4926
  return Range.fromPoints(start,end);
4917
4927
  } catch(e) {
@@ -5078,7 +5088,7 @@ var Tokenizer = function(rules) {
5078
5088
  };
5079
5089
  }
5080
5090
  return tokens;
5081
- },
5091
+ };
5082
5092
 
5083
5093
  this.$arrayTokens = function(str) {
5084
5094
  if (!str)
@@ -5587,7 +5597,7 @@ function addUnicodePackage (pack) {
5587
5597
  var codePoint = /\w{4}/g;
5588
5598
  for (var name in pack)
5589
5599
  exports.packages[name] = pack[name].replace(codePoint, "\\u$&");
5590
- };
5600
+ }
5591
5601
 
5592
5602
  });
5593
5603
 
@@ -5749,7 +5759,7 @@ var Mode = function() {
5749
5759
  return true;
5750
5760
  var tokens = session.getTokens(row);
5751
5761
  for (var i = 0; i < tokens.length; i++) {
5752
- if (tokens[i].type === 'comment')
5762
+ if (tokens[i].type === "comment")
5753
5763
  return true;
5754
5764
  }
5755
5765
  };
@@ -5922,8 +5932,8 @@ var Mode = function() {
5922
5932
  }
5923
5933
  }
5924
5934
 
5925
- var delegations = ['toggleBlockComment', 'toggleCommentLines', 'getNextLineIndent',
5926
- 'checkOutdent', 'autoOutdent', 'transformAction', 'getCompletions'];
5935
+ var delegations = ["toggleBlockComment", "toggleCommentLines", "getNextLineIndent",
5936
+ "checkOutdent", "autoOutdent", "transformAction", "getCompletions"];
5927
5937
 
5928
5938
  for (var i = 0; i < delegations.length; i++) {
5929
5939
  (function(scope) {
@@ -5932,7 +5942,7 @@ var Mode = function() {
5932
5942
  scope[delegations[i]] = function() {
5933
5943
  return this.$delegator(functionName, arguments, defaultHandler);
5934
5944
  };
5935
- } (this));
5945
+ }(this));
5936
5946
  }
5937
5947
  };
5938
5948
 
@@ -7030,7 +7040,7 @@ var RangeList = function() {
7030
7040
  this.addList = function(list) {
7031
7041
  var removed = [];
7032
7042
  for (var i = list.length; i--; ) {
7033
- removed.push.call(removed, this.add(list[i]));
7043
+ removed.push.apply(removed, this.add(list[i]));
7034
7044
  }
7035
7045
  return removed;
7036
7046
  };
@@ -9394,11 +9404,11 @@ var EditSession = function(text, mode) {
9394
9404
  function addSplit(screenPos) {
9395
9405
  var displayed = tokens.slice(lastSplit, screenPos);
9396
9406
  var len = displayed.length;
9397
- displayed.join("").
9398
- replace(/12/g, function() {
9407
+ displayed.join("")
9408
+ .replace(/12/g, function() {
9399
9409
  len -= 1;
9400
- }).
9401
- replace(/2/g, function() {
9410
+ })
9411
+ .replace(/2/g, function() {
9402
9412
  len -= 1;
9403
9413
  });
9404
9414
 
@@ -9851,7 +9861,7 @@ var EditSession = function(text, mode) {
9851
9861
  c >= 0xFE68 && c <= 0xFE6B ||
9852
9862
  c >= 0xFF01 && c <= 0xFF60 ||
9853
9863
  c >= 0xFFE0 && c <= 0xFFE6;
9854
- };
9864
+ }
9855
9865
 
9856
9866
  }).call(EditSession.prototype);
9857
9867
 
@@ -10317,7 +10327,7 @@ MultiHashHandler.prototype = HashHandler.prototype;
10317
10327
  };
10318
10328
 
10319
10329
  this.bindKey = function(key, command, position) {
10320
- if (typeof key == "object") {
10330
+ if (typeof key == "object" && key) {
10321
10331
  if (position == undefined)
10322
10332
  position = key.position;
10323
10333
  key = key[this.platform];
@@ -11486,76 +11496,76 @@ var Editor = function(renderer, session) {
11486
11496
 
11487
11497
  var oldSession = this.session;
11488
11498
  if (oldSession) {
11489
- this.session.removeEventListener("change", this.$onDocumentChange);
11490
- this.session.removeEventListener("changeMode", this.$onChangeMode);
11491
- this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
11492
- this.session.removeEventListener("changeTabSize", this.$onChangeTabSize);
11493
- this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit);
11494
- this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode);
11495
- this.session.removeEventListener("onChangeFold", this.$onChangeFold);
11496
- this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker);
11497
- this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker);
11498
- this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint);
11499
- this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation);
11500
- this.session.removeEventListener("changeOverwrite", this.$onCursorChange);
11501
- this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange);
11502
- this.session.removeEventListener("changeScrollLeft", this.$onScrollLeftChange);
11499
+ this.session.off("change", this.$onDocumentChange);
11500
+ this.session.off("changeMode", this.$onChangeMode);
11501
+ this.session.off("tokenizerUpdate", this.$onTokenizerUpdate);
11502
+ this.session.off("changeTabSize", this.$onChangeTabSize);
11503
+ this.session.off("changeWrapLimit", this.$onChangeWrapLimit);
11504
+ this.session.off("changeWrapMode", this.$onChangeWrapMode);
11505
+ this.session.off("changeFold", this.$onChangeFold);
11506
+ this.session.off("changeFrontMarker", this.$onChangeFrontMarker);
11507
+ this.session.off("changeBackMarker", this.$onChangeBackMarker);
11508
+ this.session.off("changeBreakpoint", this.$onChangeBreakpoint);
11509
+ this.session.off("changeAnnotation", this.$onChangeAnnotation);
11510
+ this.session.off("changeOverwrite", this.$onCursorChange);
11511
+ this.session.off("changeScrollTop", this.$onScrollTopChange);
11512
+ this.session.off("changeScrollLeft", this.$onScrollLeftChange);
11503
11513
 
11504
11514
  var selection = this.session.getSelection();
11505
- selection.removeEventListener("changeCursor", this.$onCursorChange);
11506
- selection.removeEventListener("changeSelection", this.$onSelectionChange);
11515
+ selection.off("changeCursor", this.$onCursorChange);
11516
+ selection.off("changeSelection", this.$onSelectionChange);
11507
11517
  }
11508
11518
 
11509
11519
  this.session = session;
11510
11520
  if (session) {
11511
11521
  this.$onDocumentChange = this.onDocumentChange.bind(this);
11512
- session.addEventListener("change", this.$onDocumentChange);
11522
+ session.on("change", this.$onDocumentChange);
11513
11523
  this.renderer.setSession(session);
11514
11524
 
11515
11525
  this.$onChangeMode = this.onChangeMode.bind(this);
11516
- session.addEventListener("changeMode", this.$onChangeMode);
11526
+ session.on("changeMode", this.$onChangeMode);
11517
11527
 
11518
11528
  this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
11519
- session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
11529
+ session.on("tokenizerUpdate", this.$onTokenizerUpdate);
11520
11530
 
11521
11531
  this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);
11522
- session.addEventListener("changeTabSize", this.$onChangeTabSize);
11532
+ session.on("changeTabSize", this.$onChangeTabSize);
11523
11533
 
11524
11534
  this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
11525
- session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
11535
+ session.on("changeWrapLimit", this.$onChangeWrapLimit);
11526
11536
 
11527
11537
  this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
11528
- session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
11538
+ session.on("changeWrapMode", this.$onChangeWrapMode);
11529
11539
 
11530
11540
  this.$onChangeFold = this.onChangeFold.bind(this);
11531
- session.addEventListener("changeFold", this.$onChangeFold);
11541
+ session.on("changeFold", this.$onChangeFold);
11532
11542
 
11533
11543
  this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
11534
- this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
11544
+ this.session.on("changeFrontMarker", this.$onChangeFrontMarker);
11535
11545
 
11536
11546
  this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
11537
- this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
11547
+ this.session.on("changeBackMarker", this.$onChangeBackMarker);
11538
11548
 
11539
11549
  this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
11540
- this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
11550
+ this.session.on("changeBreakpoint", this.$onChangeBreakpoint);
11541
11551
 
11542
11552
  this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
11543
- this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
11553
+ this.session.on("changeAnnotation", this.$onChangeAnnotation);
11544
11554
 
11545
11555
  this.$onCursorChange = this.onCursorChange.bind(this);
11546
- this.session.addEventListener("changeOverwrite", this.$onCursorChange);
11556
+ this.session.on("changeOverwrite", this.$onCursorChange);
11547
11557
 
11548
11558
  this.$onScrollTopChange = this.onScrollTopChange.bind(this);
11549
- this.session.addEventListener("changeScrollTop", this.$onScrollTopChange);
11559
+ this.session.on("changeScrollTop", this.$onScrollTopChange);
11550
11560
 
11551
11561
  this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
11552
- this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
11562
+ this.session.on("changeScrollLeft", this.$onScrollLeftChange);
11553
11563
 
11554
11564
  this.selection = session.getSelection();
11555
- this.selection.addEventListener("changeCursor", this.$onCursorChange);
11565
+ this.selection.on("changeCursor", this.$onCursorChange);
11556
11566
 
11557
11567
  this.$onSelectionChange = this.onSelectionChange.bind(this);
11558
- this.selection.addEventListener("changeSelection", this.$onSelectionChange);
11568
+ this.selection.on("changeSelection", this.$onSelectionChange);
11559
11569
 
11560
11570
  this.onChangeMode();
11561
11571
 
@@ -13022,9 +13032,9 @@ var Editor = function(renderer, session) {
13022
13032
  if (enable)
13023
13033
  return;
13024
13034
  delete this.setAutoScrollEditorIntoView;
13025
- this.removeEventListener("changeSelection", onChangeSelection);
13026
- this.renderer.removeEventListener("afterRender", onAfterRender);
13027
- this.renderer.removeEventListener("beforeRender", onBeforeRender);
13035
+ this.off("changeSelection", onChangeSelection);
13036
+ this.renderer.off("afterRender", onAfterRender);
13037
+ this.renderer.off("beforeRender", onBeforeRender);
13028
13038
  };
13029
13039
  };
13030
13040
 
@@ -13079,6 +13089,11 @@ config.defineOptions(Editor.prototype, "editor", {
13079
13089
  autoScrollEditorIntoView: {
13080
13090
  set: function(val) {this.setAutoScrollEditorIntoView(val)}
13081
13091
  },
13092
+ keyboardHandler: {
13093
+ set: function(val) { this.setKeyboardHandler(val); },
13094
+ get: function() { return this.keybindingId; },
13095
+ handlesSet: true
13096
+ },
13082
13097
 
13083
13098
  hScrollBarAlwaysVisible: "renderer",
13084
13099
  vScrollBarAlwaysVisible: "renderer",
@@ -13195,7 +13210,7 @@ var UndoManager = function() {
13195
13210
  start: delta.start,
13196
13211
  end: delta.end,
13197
13212
  lines: delta.lines.length == 1 ? null : delta.lines,
13198
- text: delta.lines.length == 1 ? delta.lines[0] : null,
13213
+ text: delta.lines.length == 1 ? delta.lines[0] : null
13199
13214
  };
13200
13215
  }
13201
13216
 
@@ -14579,7 +14594,7 @@ var EventEmitter = require("../lib/event_emitter").EventEmitter;
14579
14594
 
14580
14595
  var CHAR_COUNT = 0;
14581
14596
 
14582
- var FontMetrics = exports.FontMetrics = function(parentEl, interval) {
14597
+ var FontMetrics = exports.FontMetrics = function(parentEl) {
14583
14598
  this.el = dom.createElement("div");
14584
14599
  this.$setMeasureNodeStyles(this.el.style, true);
14585
14600
 
@@ -14674,7 +14689,7 @@ var FontMetrics = exports.FontMetrics = function(parentEl, interval) {
14674
14689
  rect = this.$measureNode.getBoundingClientRect();
14675
14690
  } catch(e) {
14676
14691
  rect = {width: 0, height:0 };
14677
- };
14692
+ }
14678
14693
  var size = {
14679
14694
  height: rect.height,
14680
14695
  width: rect.width / CHAR_COUNT
@@ -14699,7 +14714,7 @@ var FontMetrics = exports.FontMetrics = function(parentEl, interval) {
14699
14714
  this.getCharacterWidth = function(ch) {
14700
14715
  var w = this.charSizes[ch];
14701
14716
  if (w === undefined) {
14702
- this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;
14717
+ w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;
14703
14718
  }
14704
14719
  return w;
14705
14720
  };
@@ -15162,7 +15177,7 @@ var VirtualRenderer = function(container, theme) {
15162
15177
  column : 0
15163
15178
  };
15164
15179
 
15165
- this.$fontMetrics = new FontMetrics(this.container, 500);
15180
+ this.$fontMetrics = new FontMetrics(this.container);
15166
15181
  this.$textLayer.$setFontMetrics(this.$fontMetrics);
15167
15182
  this.$textLayer.addEventListener("changeCharacterSize", function(e) {
15168
15183
  _self.updateCharacterSize();
@@ -15557,8 +15572,12 @@ var VirtualRenderer = function(container, theme) {
15557
15572
  return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);
15558
15573
  };
15559
15574
  this.getLastFullyVisibleRow = function() {
15560
- var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight);
15561
- return this.layerConfig.firstRow - 1 + flint;
15575
+ var config = this.layerConfig;
15576
+ var lastRow = config.lastRow
15577
+ var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight;
15578
+ if (top - this.session.getScrollTop() > config.height - config.lineHeight)
15579
+ return lastRow - 1;
15580
+ return lastRow;
15562
15581
  };
15563
15582
  this.getLastVisibleRow = function() {
15564
15583
  return this.layerConfig.lastRow;
@@ -15932,13 +15951,13 @@ var VirtualRenderer = function(container, theme) {
15932
15951
  var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;
15933
15952
 
15934
15953
  if (scrollTop + topMargin > top) {
15935
- if (offset)
15954
+ if (offset && scrollTop + topMargin > top + this.lineHeight)
15936
15955
  top -= offset * this.$size.scrollerHeight;
15937
15956
  if (top === 0)
15938
15957
  top = -this.scrollMargin.top;
15939
15958
  this.session.setScrollTop(top);
15940
15959
  } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) {
15941
- if (offset)
15960
+ if (offset && scrollTop + this.$size.scrollerHeight - bottomMargin < top - this.lineHeight)
15942
15961
  top += offset * this.$size.scrollerHeight;
15943
15962
  this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);
15944
15963
  }
@@ -16605,7 +16624,7 @@ var PlaceHolder = function(session, length, pos, others, mainClass, othersClass)
16605
16624
 
16606
16625
  this.$pos = pos;
16607
16626
  var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1};
16608
- this.$undoStackDepth = undoStack.length;
16627
+ this.$undoStackDepth = undoStack.length;
16609
16628
  this.setup();
16610
16629
 
16611
16630
  session.selection.on("changeCursor", this.$onCursorChange);
@@ -16618,103 +16637,97 @@ var PlaceHolder = function(session, length, pos, others, mainClass, othersClass)
16618
16637
  var _self = this;
16619
16638
  var doc = this.doc;
16620
16639
  var session = this.session;
16621
- var pos = this.$pos;
16622
16640
 
16623
16641
  this.selectionBefore = session.selection.toJSON();
16624
16642
  if (session.selection.inMultiSelectMode)
16625
16643
  session.selection.toSingleRange();
16626
16644
 
16627
- this.pos = doc.createAnchor(pos.row, pos.column);
16628
- this.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);
16629
- this.pos.on("change", function(event) {
16630
- session.removeMarker(_self.markerId);
16631
- _self.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.mainClass, null, false);
16632
- });
16645
+ this.pos = doc.createAnchor(this.$pos.row, this.$pos.column);
16646
+ var pos = this.pos;
16647
+ pos.$insertRight = true;
16648
+ pos.detach();
16649
+ pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);
16633
16650
  this.others = [];
16634
16651
  this.$others.forEach(function(other) {
16635
16652
  var anchor = doc.createAnchor(other.row, other.column);
16653
+ anchor.$insertRight = true;
16654
+ anchor.detach();
16636
16655
  _self.others.push(anchor);
16637
16656
  });
16638
16657
  session.setUndoSelect(false);
16639
16658
  };
16640
16659
  this.showOtherMarkers = function() {
16641
- if(this.othersActive) return;
16660
+ if (this.othersActive) return;
16642
16661
  var session = this.session;
16643
16662
  var _self = this;
16644
16663
  this.othersActive = true;
16645
16664
  this.others.forEach(function(anchor) {
16646
16665
  anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false);
16647
- anchor.on("change", function(event) {
16648
- session.removeMarker(anchor.markerId);
16649
- anchor.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.othersClass, null, false);
16650
- });
16651
16666
  });
16652
16667
  };
16653
16668
  this.hideOtherMarkers = function() {
16654
- if(!this.othersActive) return;
16669
+ if (!this.othersActive) return;
16655
16670
  this.othersActive = false;
16656
16671
  for (var i = 0; i < this.others.length; i++) {
16657
16672
  this.session.removeMarker(this.others[i].markerId);
16658
16673
  }
16659
16674
  };
16660
16675
  this.onUpdate = function(delta) {
16676
+ if (this.$updating)
16677
+ return this.updateAnchors(delta);
16678
+
16661
16679
  var range = delta;
16662
- if(range.start.row !== range.end.row) return;
16663
- if(range.start.row !== this.pos.row) return;
16664
- if (this.$updating) return;
16680
+ if (range.start.row !== range.end.row) return;
16681
+ if (range.start.row !== this.pos.row) return;
16665
16682
  this.$updating = true;
16666
16683
  var lengthDiff = delta.action === "insert" ? range.end.column - range.start.column : range.start.column - range.end.column;
16684
+ var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1;
16685
+ var distanceFromStart = range.start.column - this.pos.column;
16686
+
16687
+ this.updateAnchors(delta);
16667
16688
 
16668
- if(range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1) {
16669
- var distanceFromStart = range.start.column - this.pos.column;
16689
+ if (inMainRange)
16670
16690
  this.length += lengthDiff;
16671
- if(!this.session.$fromUndo) {
16672
- if(delta.action === 'insert') {
16673
- for (var i = this.others.length - 1; i >= 0; i--) {
16674
- var otherPos = this.others[i];
16675
- var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
16676
- if(otherPos.row === range.start.row && range.start.column < otherPos.column)
16677
- newPos.column += lengthDiff;
16678
- this.doc.insertMergedLines(newPos, delta.lines);
16679
- }
16680
- } else if(delta.action === 'remove') {
16681
- for (var i = this.others.length - 1; i >= 0; i--) {
16682
- var otherPos = this.others[i];
16683
- var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
16684
- if(otherPos.row === range.start.row && range.start.column < otherPos.column)
16685
- newPos.column += lengthDiff;
16686
- this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));
16687
- }
16688
- }
16689
- if(range.start.column === this.pos.column && delta.action === 'insert') {
16690
- setTimeout(function() {
16691
- this.pos.setPosition(this.pos.row, this.pos.column - lengthDiff);
16692
- for (var i = 0; i < this.others.length; i++) {
16693
- var other = this.others[i];
16694
- var newPos = {row: other.row, column: other.column - lengthDiff};
16695
- if(other.row === range.start.row && range.start.column < other.column)
16696
- newPos.column += lengthDiff;
16697
- other.setPosition(newPos.row, newPos.column);
16698
- }
16699
- }.bind(this), 0);
16691
+
16692
+ if (inMainRange && !this.session.$fromUndo) {
16693
+ if (delta.action === 'insert') {
16694
+ for (var i = this.others.length - 1; i >= 0; i--) {
16695
+ var otherPos = this.others[i];
16696
+ var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
16697
+ this.doc.insertMergedLines(newPos, delta.lines);
16700
16698
  }
16701
- else if(range.start.column === this.pos.column && delta.action === 'remove') {
16702
- setTimeout(function() {
16703
- for (var i = 0; i < this.others.length; i++) {
16704
- var other = this.others[i];
16705
- if(other.row === range.start.row && range.start.column < other.column) {
16706
- other.setPosition(other.row, other.column - lengthDiff);
16707
- }
16708
- }
16709
- }.bind(this), 0);
16699
+ } else if (delta.action === 'remove') {
16700
+ for (var i = this.others.length - 1; i >= 0; i--) {
16701
+ var otherPos = this.others[i];
16702
+ var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
16703
+ this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));
16710
16704
  }
16711
16705
  }
16712
- this.pos._emit("change", {value: this.pos});
16713
- for (var i = 0; i < this.others.length; i++) {
16714
- this.others[i]._emit("change", {value: this.others[i]});
16715
- }
16716
16706
  }
16707
+
16717
16708
  this.$updating = false;
16709
+ this.updateMarkers();
16710
+ };
16711
+
16712
+ this.updateAnchors = function(delta) {
16713
+ this.pos.onChange(delta);
16714
+ for (var i = this.others.length; i--;)
16715
+ this.others[i].onChange(delta);
16716
+ this.updateMarkers();
16717
+ };
16718
+
16719
+ this.updateMarkers = function() {
16720
+ if (this.$updating)
16721
+ return;
16722
+ var _self = this;
16723
+ var session = this.session;
16724
+ var updateMarker = function(pos, className) {
16725
+ session.removeMarker(pos.markerId);
16726
+ pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column+_self.length), className, null, false);
16727
+ };
16728
+ updateMarker(this.pos, this.mainClass);
16729
+ for (var i = this.others.length; i--;)
16730
+ updateMarker(this.others[i], this.othersClass);
16718
16731
  };
16719
16732
 
16720
16733
  this.onCursorChange = function(event) {
@@ -16729,20 +16742,16 @@ var PlaceHolder = function(session, length, pos, others, mainClass, othersClass)
16729
16742
  }
16730
16743
  };
16731
16744
  this.detach = function() {
16732
- this.session.removeMarker(this.markerId);
16745
+ this.session.removeMarker(this.pos && this.pos.markerId);
16733
16746
  this.hideOtherMarkers();
16734
16747
  this.doc.removeEventListener("change", this.$onUpdate);
16735
16748
  this.session.selection.removeEventListener("changeCursor", this.$onCursorChange);
16736
- this.pos.detach();
16737
- for (var i = 0; i < this.others.length; i++) {
16738
- this.others[i].detach();
16739
- }
16740
16749
  this.session.setUndoSelect(true);
16741
16750
  this.session = null;
16742
16751
  };
16743
16752
  this.cancel = function() {
16744
- if(this.$undoStackDepth === -1)
16745
- throw Error("Canceling placeholders only supported with undo manager attached to session.");
16753
+ if (this.$undoStackDepth === -1)
16754
+ return;
16746
16755
  var undoManager = this.session.getUndoManager();
16747
16756
  var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth;
16748
16757
  for (var i = 0; i < undosRequired; i++) {
@@ -17730,8 +17739,8 @@ exports.onSessionChange = function(e) {
17730
17739
  oldSession.multiSelect.off("removeRange", this.$onRemoveRange);
17731
17740
  oldSession.multiSelect.off("multiSelect", this.$onMultiSelect);
17732
17741
  oldSession.multiSelect.off("singleSelect", this.$onSingleSelect);
17733
- oldSession.multiSelect.lead.off("change", this.$checkMultiselectChange);
17734
- oldSession.multiSelect.anchor.off("change", this.$checkMultiselectChange);
17742
+ oldSession.multiSelect.lead.off("change", this.$checkMultiselectChange);
17743
+ oldSession.multiSelect.anchor.off("change", this.$checkMultiselectChange);
17735
17744
  }
17736
17745
 
17737
17746
  if (session) {
@@ -17739,8 +17748,8 @@ exports.onSessionChange = function(e) {
17739
17748
  session.multiSelect.on("removeRange", this.$onRemoveRange);
17740
17749
  session.multiSelect.on("multiSelect", this.$onMultiSelect);
17741
17750
  session.multiSelect.on("singleSelect", this.$onSingleSelect);
17742
- session.multiSelect.lead.on("change", this.$checkMultiselectChange);
17743
- session.multiSelect.anchor.on("change", this.$checkMultiselectChange);
17751
+ session.multiSelect.lead.on("change", this.$checkMultiselectChange);
17752
+ session.multiSelect.anchor.on("change", this.$checkMultiselectChange);
17744
17753
  }
17745
17754
 
17746
17755
  if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) {
@@ -18307,6 +18316,8 @@ function LineWidgets(session) {
18307
18316
  if (!w || !w.el) continue;
18308
18317
  if (w.session != this.session) continue;
18309
18318
  if (!w._inDocument) {
18319
+ if (this.session.lineWidgets[w.row] != w)
18320
+ continue;
18310
18321
  w._inDocument = true;
18311
18322
  renderer.container.appendChild(w.el);
18312
18323
  }
@@ -18601,7 +18612,7 @@ require("./ext/error_marker");
18601
18612
  exports.config = require("./config");
18602
18613
  exports.require = require;
18603
18614
  exports.edit = function(el) {
18604
- if (typeof(el) == "string") {
18615
+ if (typeof el == "string") {
18605
18616
  var _id = el;
18606
18617
  el = document.getElementById(_id);
18607
18618
  if (!el)
@@ -18619,7 +18630,7 @@ exports.edit = function(el) {
18619
18630
  oldNode.parentNode.replaceChild(el, oldNode);
18620
18631
  } else if (el) {
18621
18632
  value = dom.getInnerText(el);
18622
- el.innerHTML = '';
18633
+ el.innerHTML = "";
18623
18634
  }
18624
18635
 
18625
18636
  var doc = exports.createEditSession(value);
@@ -18648,6 +18659,7 @@ exports.createEditSession = function(text, mode) {
18648
18659
  }
18649
18660
  exports.EditSession = EditSession;
18650
18661
  exports.UndoManager = UndoManager;
18662
+ exports.version = "1.2.3";
18651
18663
  });
18652
18664
  (function() {
18653
18665
  window.require(["ace/ace"], function(a) {