diff --git a/lib/ace/config_test.js b/lib/ace/config_test.js index ac664fae..2883d9e5 100644 --- a/lib/ace/config_test.js +++ b/lib/ace/config_test.js @@ -117,12 +117,19 @@ module.exports = { assert.equal(o.getOption("initialValue"), 8); o.setOption("initialValue", 7); assert.equal(o.getOption("opt2"), 7); - + + config.setDefaultValues("test_object", { + opt1: 1, + forwarded: 2 + }); + config.resetOptions(o); + assert.equal(o.getOption("opt1"), 1); + assert.equal(o.getOption("forwarded"), 2); } }; }); if (typeof module !== "undefined" && module === require.main) { - require("asyncjs").test.testcase(module.exports).exec() + require("asyncjs").test.testcase(module.exports).exec(); } diff --git a/lib/ace/editor.js b/lib/ace/editor.js index f487b49e..3bb2c0e4 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -539,11 +539,14 @@ var Editor = function(renderer, session) { var iterator = new TokenIterator(self.session, pos.row, pos.column); var token = iterator.getCurrentToken(); - if (!token || token.type.indexOf('tag-name') === -1) { + if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) { session.removeMarker(session.$tagHighlight); session.$tagHighlight = null; return; } + + if (token.type.indexOf("tag-open") != -1) + token = iterator.stepForward(); var tag = token.value; var depth = 0; diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index c0902e27..605f5b8e 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -45,10 +45,10 @@ var TextInput = function(parentNode, host) { if (useragent.isTouchPad) text.setAttribute("x-palm-disable-auto-cap", true); - text.wrap = "off"; - text.autocorrect = "off"; - text.autocapitalize = "off"; - text.spellcheck = false; + text.setAttribute("wrap", "off"); + text.setAttribute("autocorrect", "off"); + text.setAttribute("autocapitalize", "off"); + text.setAttribute("spellcheck", false); text.style.opacity = "0"; if (useragent.isOldIE) text.style.top = "-100px"; diff --git a/lib/ace/lib/app_config.js b/lib/ace/lib/app_config.js index 84b9e70c..4fe78a1d 100644 --- a/lib/ace/lib/app_config.js +++ b/lib/ace/lib/app_config.js @@ -31,7 +31,6 @@ define(function(require, exports, module) { "no use strict"; -var lang = require("./lang"); var oop = require("./oop"); var EventEmitter = require("./event_emitter").EventEmitter; @@ -91,10 +90,10 @@ function reportError(msg, data) { if (typeof console == "object" && console.error) console.error(e); setTimeout(function() { throw e; }); -}; +} var AppConfig = function() { - this.$defaultOptions = {}; + this.$defaultOptions = {}; }; (function() { @@ -145,7 +144,7 @@ var AppConfig = function() { this.setDefaultValues = function(path, optionHash) { Object.keys(optionHash).forEach(function(key) { this.setDefaultValue(path, key, optionHash[key]); - }); + }, this); }; this.warn = warn; diff --git a/lib/ace/mouse/multi_select_handler.js b/lib/ace/mouse/multi_select_handler.js index 8d6af6b5..9b52e237 100644 --- a/lib/ace/mouse/multi_select_handler.js +++ b/lib/ace/mouse/multi_select_handler.js @@ -150,7 +150,8 @@ function onMouseDown(e) { if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead)) return; screenCursor = newCursor; - + + editor.$blockScrolling++; editor.selection.moveToPosition(cursor); editor.renderer.scrollCursorIntoView(); @@ -160,8 +161,9 @@ function onMouseDown(e) { rectSel[0] = editor.$mouseHandler.$clickSelection.clone(); rectSel.forEach(editor.addSelectionMarker, editor); editor.updateSelectionMarkers(); + editor.$blockScrolling--; }; - + editor.$blockScrolling++; if (isMultiSelect && !accel) { selection.toSingleRange(); } else if (!isMultiSelect && accel) { @@ -173,6 +175,7 @@ function onMouseDown(e) { screenAnchor = session.documentToScreenPosition(selection.lead); else selection.moveToPosition(pos); + editor.$blockScrolling--; screenCursor = {row: -1, column: -1};