Skip to content

Commit 7b80bb7

Browse files
committed
cleanup
1 parent 37fc612 commit 7b80bb7

4 files changed

Lines changed: 15 additions & 6 deletions

File tree

doc/site/js/main.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ $(function() {
66
editor.container.style.opacity = "";
77
embedded_editor = ace.edit("embedded_ace_code");
88
embedded_editor.container.style.opacity = "";
9-
editor.session.setMode("ace/mode/javascript");
10-
editor.session.setMode("ace/mode/javascript");
9+
editor.session.setMode("ace/mode/javascript");
1110
embedded_editor.session.setMode("ace/mode/html");
1211

12+
editor.setOptions({
13+
maxLines: 30
14+
})
15+
1316
ace.config.loadModule("ace/ext/emmet", function() {
1417
ace.require("ace/lib/net").loadScript("http://nightwing.github.io/emmet-core/emmet.js", function() {
1518
embedded_editor.setOption("enableEmmet", true);

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ <h1>Built for Code</h1>
8080

8181
var addResult = add(3, 2);
8282
console.log(addResult);
83-
</div>
83+
</div>
8484
<p id="embed_link"><a href="#nav=embedding">Learn how to embed this in your own site</a></p>
8585
<p class="highlight_note">Looking for a more full-featured demo? Check out the
8686
<a href="build/kitchen-sink.html" target="_blank">kitchen sink</a>.

lib/ace/autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ var Autocomplete = function() {
9090
this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
9191
this.editor.off("changeSelection", this.changeListener);
9292
this.editor.off("blur", this.changeListener);
93-
this.editor.off("mousedown", this.changeListener);
93+
this.editor.off("mousedown", this.mousedownListener);
9494
this.editor.off("mousewheel", this.mousewheelListener);
9595
this.changeTimer.cancel();
9696

lib/ace/config.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,11 @@ var optionsProvider = {
217217
if (this["$" + name] === value)
218218
return;
219219
var opt = this.$options[name];
220-
if (!opt)
220+
if (!opt) {
221+
if (typeof console != "undefined" && console.error)
222+
console.error('misspelled option "' + name + '"');
221223
return undefined;
224+
}
222225
if (opt.forwardTo)
223226
return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);
224227

@@ -229,8 +232,11 @@ var optionsProvider = {
229232
},
230233
getOption: function(name) {
231234
var opt = this.$options[name];
232-
if (!opt)
235+
if (!opt) {
236+
if (typeof console != "undefined" && console.error)
237+
console.error('misspelled option "' + name + '"');
233238
return undefined;
239+
}
234240
if (opt.forwardTo)
235241
return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);
236242
return opt && opt.get ? opt.get.call(this) : this["$" + name];

0 commit comments

Comments
 (0)