diff --git a/build b/build index c2f3abb2..6149ca6b 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit c2f3abb2ecd3287f90225d804132f0fd26cfb639 +Subproject commit 6149ca6b148e878d4c1341d4675ca3597d78dbdd diff --git a/lib/ace/edit_session/folding.js b/lib/ace/edit_session/folding.js index db97cce7..7676150c 100644 --- a/lib/ace/edit_session/folding.js +++ b/lib/ace/edit_session/folding.js @@ -683,6 +683,7 @@ function Folding() { }; this.onFoldWidgetClick = function(row, e) { + e = e.domEvent; var type = this.getFoldWidget(row); var line = this.getLine(row); var onlySubfolds = e.shiftKey; diff --git a/lib/ace/keyboard/vim/commands.js b/lib/ace/keyboard/vim/commands.js index d802cdda..78dc4fa7 100644 --- a/lib/ace/keyboard/vim/commands.js +++ b/lib/ace/keyboard/vim/commands.js @@ -304,76 +304,76 @@ var inputBuffer = exports.inputBuffer = { lastInsertCommands: [], - push: function(editor, char, keyId) { + push: function(editor, ch, keyId) { this.idle = false; var wObj = this.waitingForParam; if (wObj) { - this.exec(editor, wObj, char); + this.exec(editor, wObj, ch); } // If input is a number (that doesn't start with 0) - else if (!(char === "0" && !this.currentCount.length) && - (char.match(/^\d+$/) && this.isAccepting(NUMBER))) { - // Assuming that char is always of type String, and not Number - this.currentCount += char; + else if (!(ch === "0" && !this.currentCount.length) && + (ch.match(/^\d+$/) && this.isAccepting(NUMBER))) { + // Assuming that ch is always of type String, and not Number + this.currentCount += ch; this.currentCmd = NUMBER; this.accepting = [NUMBER, OPERATOR, MOTION, ACTION]; } - else if (!this.operator && this.isAccepting(OPERATOR) && operators[char]) { + else if (!this.operator && this.isAccepting(OPERATOR) && operators[ch]) { this.operator = { - char: char, + ch: ch, count: this.getCount() }; this.currentCmd = OPERATOR; this.accepting = [NUMBER, MOTION, ACTION]; this.exec(editor, { operator: this.operator }); } - else if (motions[char] && this.isAccepting(MOTION)) { + else if (motions[ch] && this.isAccepting(MOTION)) { this.currentCmd = MOTION; var ctx = { operator: this.operator, motion: { - char: char, + ch: ch, count: this.getCount() } }; - if (motions[char].param) + if (motions[ch].param) this.waitForParam(ctx); else this.exec(editor, ctx); } - else if (alias[char] && this.isAccepting(MOTION)) { - alias[char].operator.count = this.getCount(); - this.exec(editor, alias[char]); + else if (alias[ch] && this.isAccepting(MOTION)) { + alias[ch].operator.count = this.getCount(); + this.exec(editor, alias[ch]); } - else if (actions[char] && this.isAccepting(ACTION)) { + else if (actions[ch] && this.isAccepting(ACTION)) { var actionObj = { action: { - fn: actions[char].fn, + fn: actions[ch].fn, count: this.getCount() } }; - if (actions[char].param) { + if (actions[ch].param) { this.waitForParam(actionObj); } else { this.exec(editor, actionObj); } - if (actions[char].acceptsMotion) + if (actions[ch].acceptsMotion) this.idle = false; } else if (this.operator) { - this.exec(editor, { operator: this.operator }, char); + this.exec(editor, { operator: this.operator }, ch); } else { this.reset(); } if (this.waitingForParam || this.motion || this.operator) { - this.status += char; + this.status += ch; } else if (this.currentCount) { this.status = this.currentCount; } else if (this.status) { @@ -410,18 +410,18 @@ var inputBuffer = exports.inputBuffer = { } if (o && !editor.selection.isEmpty()) { - if (operators[o.char].selFn) { - operators[o.char].selFn(editor, editor.getSelectionRange(), o.count, param); + if (operators[o.ch].selFn) { + operators[o.ch].selFn(editor, editor.getSelectionRange(), o.count, param); this.reset(); } return; } // There is an operator, but no motion or action. We try to pass the - // current char to the operator to see if it responds to it (an example + // current ch to the operator to see if it responds to it (an example // of this is the 'dd' operator). else if (!m && !a && o && param) { - operators[o.char].fn(editor, null, o.count, param); + operators[o.ch].fn(editor, null, o.count, param); this.reset(); } else if (m) { @@ -434,7 +434,7 @@ var inputBuffer = exports.inputBuffer = { } }; - var motionObj = motions[m.char]; + var motionObj = motions[m.ch]; var selectable = motionObj.sel; if (!o) { @@ -446,7 +446,7 @@ var inputBuffer = exports.inputBuffer = { else if (selectable) { repeat(function() { run(motionObj.sel); - operators[o.char].fn(editor, editor.getSelectionRange(), o.count, param); + operators[o.ch].fn(editor, editor.getSelectionRange(), o.count, param); }, o.count || 1); } this.reset(); diff --git a/lib/ace/keyboard/vim/maps/aliases.js b/lib/ace/keyboard/vim/maps/aliases.js index ea5dbe0d..1a5f32f7 100644 --- a/lib/ace/keyboard/vim/maps/aliases.js +++ b/lib/ace/keyboard/vim/maps/aliases.js @@ -34,57 +34,57 @@ define(function(require, exports, module) { module.exports = { "x": { operator: { - char: "d", + ch: "d", count: 1 }, motion: { - char: "l", + ch: "l", count: 1 } }, "X": { operator: { - char: "d", + ch: "d", count: 1 }, motion: { - char: "h", + ch: "h", count: 1 } }, "D": { operator: { - char: "d", + ch: "d", count: 1 }, motion: { - char: "$", + ch: "$", count: 1 } }, "C": { operator: { - char: "c", + ch: "c", count: 1 }, motion: { - char: "$", + ch: "$", count: 1 } }, "s": { operator: { - char: "c", + ch: "c", count: 1 }, motion: { - char: "l", + ch: "l", count: 1 } }, "S": { operator: { - char: "c", + ch: "c", count: 1 }, param: "c" diff --git a/lib/ace/keyboard/vim/maps/motions.js b/lib/ace/keyboard/vim/maps/motions.js index 227862b9..49b68d86 100644 --- a/lib/ace/keyboard/vim/maps/motions.js +++ b/lib/ace/keyboard/vim/maps/motions.js @@ -580,7 +580,7 @@ module.exports = { sel: function(editor, range, count, param) { keepScrollPosition(editor, editor.selectPageUp); } - }, + } }; module.exports.backspace = module.exports.left = module.exports.h; diff --git a/lib/ace/keyboard/vim/maps/util.js b/lib/ace/keyboard/vim/maps/util.js index 1d5a7639..af0e07c7 100644 --- a/lib/ace/keyboard/vim/maps/util.js +++ b/lib/ace/keyboard/vim/maps/util.js @@ -99,24 +99,24 @@ module.exports = { this.onVisualLineMode = false; } }, - getRightNthChar: function(editor, cursor, char, n) { + getRightNthChar: function(editor, cursor, ch, n) { var line = editor.getSession().getLine(cursor.row); - var matches = line.substr(cursor.column + 1).split(char); + var matches = line.substr(cursor.column + 1).split(ch); - return n < matches.length ? matches.slice(0, n).join(char).length : null; + return n < matches.length ? matches.slice(0, n).join(ch).length : null; }, - getLeftNthChar: function(editor, cursor, char, n) { + getLeftNthChar: function(editor, cursor, ch, n) { var line = editor.getSession().getLine(cursor.row); - var matches = line.substr(0, cursor.column).split(char); + var matches = line.substr(0, cursor.column).split(ch); - return n < matches.length ? matches.slice(-1 * n).join(char).length : null; + return n < matches.length ? matches.slice(-1 * n).join(ch).length : null; }, - toRealChar: function(char) { - if (char.length === 1) - return char; + toRealChar: function(ch) { + if (ch.length === 1) + return ch; - if (/^shift-./.test(char)) - return char[char.length - 1].toUpperCase(); + if (/^shift-./.test(ch)) + return ch[ch.length - 1].toUpperCase(); else return ""; }, diff --git a/lib/ace/mode/coldfusion_highlight_rules.js b/lib/ace/mode/coldfusion_highlight_rules.js index 3108081f..7f4a1e3f 100644 --- a/lib/ace/mode/coldfusion_highlight_rules.js +++ b/lib/ace/mode/coldfusion_highlight_rules.js @@ -58,11 +58,11 @@ var ColdfusionHighlightRules = function() { next : "comment" }, { token : "meta.tag", - regex : "<(?=\s*script)", + regex : "<(?=script)", next : "script" }, { token : "meta.tag", - regex : "<(?=\s*style)", + regex : "<(?=style)", next : "style" }, { token : "meta.tag", // opening tag diff --git a/lib/ace/mode/diff_highlight_rules.js b/lib/ace/mode/diff_highlight_rules.js index cdb9df18..f232da31 100644 --- a/lib/ace/mode/diff_highlight_rules.js +++ b/lib/ace/mode/diff_highlight_rules.js @@ -74,14 +74,14 @@ var DiffHighlightRules = function() { "support.constant", "text", "invalid" - ], + ] }, { // removed "regex": "^([<\\-])(.*?)(\\s*)$", "token": [ "support.function", "string", "invalid" - ], + ] }, { "regex": "^(diff)(\\s+--\\w+)?(.+?)( .+)?$", "token": ["variable", "variable", "keyword", "variable"] diff --git a/lib/ace/mode/folding/pythonic_test.js b/lib/ace/mode/folding/pythonic_test.js index 04cbfdea..e30785b8 100644 --- a/lib/ace/mode/folding/pythonic_test.js +++ b/lib/ace/mode/folding/pythonic_test.js @@ -47,7 +47,7 @@ module.exports = { ']', '[ ', '{ ', - '[ #-', + '[ #-' ]); var mode = new PythonMode(); diff --git a/lib/ace/mode/html_highlight_rules.js b/lib/ace/mode/html_highlight_rules.js index cf80bdd7..d6f42f63 100644 --- a/lib/ace/mode/html_highlight_rules.js +++ b/lib/ace/mode/html_highlight_rules.js @@ -80,11 +80,11 @@ var HtmlHighlightRules = function() { regex : "<\\!.*?>" }, { token : "meta.tag", - regex : "<(?=\s*script\\b)", + regex : "<(?=script\\b)", next : "script" }, { token : "meta.tag", - regex : "<(?=\s*style\\b)", + regex : "<(?=style\\b)", next : "style" }, { token : "meta.tag", // opening tag diff --git a/lib/ace/mode/jade_highlight_rules.js b/lib/ace/mode/jade_highlight_rules.js index 41042038..4f75b77f 100644 --- a/lib/ace/mode/jade_highlight_rules.js +++ b/lib/ace/mode/jade_highlight_rules.js @@ -82,7 +82,7 @@ var JadeHighlightRules = function() { }, { "token" : "punctuation.section.comment", - "regex" : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)", + "regex" : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)" }, { "token" : function(space, text) { diff --git a/lib/ace/mode/java_highlight_rules.js b/lib/ace/mode/java_highlight_rules.js index a37f9586..ab05fbde 100644 --- a/lib/ace/mode/java_highlight_rules.js +++ b/lib/ace/mode/java_highlight_rules.js @@ -55,8 +55,7 @@ var JavaHighlightRules = function() { "variable.language": "this", "keyword": keywords, "constant.language": buildinConstants, - "support.function": langClasses, - + "support.function": langClasses }, "identifier"); // regexp must not have capturing parentheses. Use (?:) instead. diff --git a/lib/ace/mode/javascript_highlight_rules.js b/lib/ace/mode/javascript_highlight_rules.js index 3d35c075..9481cb20 100644 --- a/lib/ace/mode/javascript_highlight_rules.js +++ b/lib/ace/mode/javascript_highlight_rules.js @@ -286,7 +286,7 @@ var JavaScriptHighlightRules = function() { merge: true }, { token: "constant.language.escape", - regex: "-", + regex: "-" }, { token: "string.regexp.charachterclass", regex: /[^\]\-\\]+/, diff --git a/lib/ace/mode/latex_highlight_rules.js b/lib/ace/mode/latex_highlight_rules.js index e07024cb..3057c0de 100644 --- a/lib/ace/mode/latex_highlight_rules.js +++ b/lib/ace/mode/latex_highlight_rules.js @@ -9,7 +9,7 @@ var LatexHighlightRules = function() { "start" : [{ // A tex command e.g. \foo token : "keyword", - regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)", + regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)" }, { // Curly and square braces token : "lparen", diff --git a/lib/ace/mode/lua.js b/lib/ace/mode/lua.js index a8aefdba..efb3ffd1 100644 --- a/lib/ace/mode/lua.js +++ b/lib/ace/mode/lua.js @@ -51,7 +51,7 @@ oop.inherits(Mode, TextMode); "elseif": 1, "repeat": 1, "end": -1, - "until": -1, + "until": -1 }; var outdentKeywords = [ "else", diff --git a/lib/ace/mode/pgsql_highlight_rules.js b/lib/ace/mode/pgsql_highlight_rules.js index 5d167d93..c0a37cc2 100755 --- a/lib/ace/mode/pgsql_highlight_rules.js +++ b/lib/ace/mode/pgsql_highlight_rules.js @@ -404,7 +404,7 @@ var PgsqlHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "support.function": builtinFunctions, - "keyword": keywords, + "keyword": keywords }, "identifier", true); diff --git a/lib/ace/mode/ruby_highlight_rules.js b/lib/ace/mode/ruby_highlight_rules.js index 168657ac..d7a531f8 100644 --- a/lib/ace/mode/ruby_highlight_rules.js +++ b/lib/ace/mode/ruby_highlight_rules.js @@ -122,11 +122,11 @@ var RubyHighlightRules = function() { token : "text", // namespaces aren't symbols regex : "::" }, { - token : "variable.instancce", // instance variable - regex : "@{1,2}(?:[a-zA-Z_]|\d)+" + token : "variable.instance", // instance variable + regex : "@{1,2}[a-zA-Z_\\d]+" }, { token : "variable.class", // class name - regex : "[A-Z](?:[a-zA-Z_]|\d)+" + regex : "[A-Z][a-zA-Z_\\d]+" }, { token : "string", // symbol regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" diff --git a/lib/ace/mode/scad_highlight_rules.js b/lib/ace/mode/scad_highlight_rules.js index 3bf4bf3a..6b98b283 100644 --- a/lib/ace/mode/scad_highlight_rules.js +++ b/lib/ace/mode/scad_highlight_rules.js @@ -40,7 +40,7 @@ var scadHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "variable.language": "this", "keyword": "module|if|else|for", - "constant.language": "NULL", + "constant.language": "NULL" }, "identifier"); // regexp must not have capturing parentheses. Use (?:) instead. diff --git a/lib/ace/mode/scala_highlight_rules.js b/lib/ace/mode/scala_highlight_rules.js index 2b905256..1277209f 100644 --- a/lib/ace/mode/scala_highlight_rules.js +++ b/lib/ace/mode/scala_highlight_rules.js @@ -126,7 +126,7 @@ var ScalaHighlightRules = function() { "string" : [ { token : "escape", - regex : '\\\\"', + regex : '\\\\"' }, { token : "string", merge : true, diff --git a/lib/ace/mode/sh_highlight_rules.js b/lib/ace/mode/sh_highlight_rules.js index d7e3185d..ebb9631a 100644 --- a/lib/ace/mode/sh_highlight_rules.js +++ b/lib/ace/mode/sh_highlight_rules.js @@ -92,7 +92,7 @@ var ShHighlightRules = function() { regex : variable }, { token : "support.function", - regex : func, + regex : func }, { token : "support.function", regex : fileDescriptor diff --git a/lib/ace/mode/svg_highlight_rules.js b/lib/ace/mode/svg_highlight_rules.js index 3d6d4161..ff03a8d3 100644 --- a/lib/ace/mode/svg_highlight_rules.js +++ b/lib/ace/mode/svg_highlight_rules.js @@ -41,7 +41,7 @@ var SvgHighlightRules = function() { this.$rules.start.splice(3, 0, { token : "meta.tag", - regex : "<(?=\s*script)", + regex : "<(?=script)", next : "script" }); diff --git a/lib/ace/mode/tcl_highlight_rules.js b/lib/ace/mode/tcl_highlight_rules.js index 5eda35be..25d72f2b 100644 --- a/lib/ace/mode/tcl_highlight_rules.js +++ b/lib/ace/mode/tcl_highlight_rules.js @@ -150,16 +150,16 @@ var TclHighlightRules = function() { }], "variable" : [ { - token : "variable.instancce", // variable xotcl with braces - regex : "(?:[:][:])?(?:[a-zA-Z_]|\d)+(?:(?:[:][:])?(?:[a-zA-Z_]|\d)+)?(?:[(](?:[a-zA-Z_]|\d)+[)])?", + token : "variable.instance", // variable xotcl with braces + regex : "(?:[:][:])?[a-zA-Z_\\d]+(?:(?:[:][:])?[a-zA-Z_\\d]+)?(?:[(][a-zA-Z_\\d]+[)])?", next : "start" }, { - token : "variable.instancce", // variable tcl - regex : "(?:[a-zA-Z_]|\d)+(?:[(](?:[a-zA-Z_]|\d)+[)])?", + token : "variable.instance", // variable tcl + regex : "[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?", next : "start" }, { - token : "variable.instancce", // variable tcl with braces - regex : "{?(?:[a-zA-Z_]|\d)+}?", + token : "variable.instance", // variable tcl with braces + regex : "{?[a-zA-Z_\\d]+}?", next : "start" }], "qqstring" : [ { diff --git a/lib/ace/search_test.js b/lib/ace/search_test.js index 942c1ec6..73d5e258 100644 --- a/lib/ace/search_test.js +++ b/lib/ace/search_test.js @@ -43,7 +43,7 @@ module.exports = { "test: configure the search object" : function() { var search = new Search(); search.set({ - needle: "juhu", + needle: "juhu" }); }, @@ -397,7 +397,7 @@ module.exports = { var search = new Search().set({ needle: "[ ]+$", regExp: true, - wrap: true, + wrap: true }); session.getSelection().moveCursorTo(1, 2); @@ -414,7 +414,7 @@ module.exports = { var search = new Search().set({ needle: "foo", wrap: true, - wholeWord: true, + wholeWord: true }); session.getSelection().moveCursorTo(0, 4); @@ -437,7 +437,7 @@ module.exports = { needle: "foo", wrap: true, wholeWord: true, - backwards: true, + backwards: true }); session.getSelection().moveCursorTo(0, 13); diff --git a/lib/ace/token_iterator_test.js b/lib/ace/token_iterator_test.js index 1b8a3b99..c7202e84 100644 --- a/lib/ace/token_iterator_test.js +++ b/lib/ace/token_iterator_test.js @@ -202,7 +202,7 @@ module.exports = { assert.equal(iterator.getCurrentToken().value, "for"); assert.equal(iterator.getCurrentTokenRow(), 1); assert.equal(iterator.getCurrentTokenColumn(), 4); - }, + } }; }); diff --git a/lib/ace/tokenizer_dev.js b/lib/ace/tokenizer_dev.js index 1972890f..53d6ea57 100644 --- a/lib/ace/tokenizer_dev.js +++ b/lib/ace/tokenizer_dev.js @@ -103,7 +103,7 @@ var Tokenizer = function(rules, flag) { var token = { type: null, value: "", - state: currentState, + state: currentState }; initState();