From ac364fe0c5ce6ae450bdb378cef23d1edf45cc42 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Tue, 1 May 2012 11:48:45 +0200 Subject: [PATCH] tabs to spaces --- lib/ace/ace.js | 2 +- lib/ace/anchor_test.js | 2 +- lib/ace/commands/command_manager_test.js | 2 +- lib/ace/commands/multi_select_commands.js | 2 +- lib/ace/config.js | 2 +- lib/ace/document.js | 160 ++--- lib/ace/document_test.js | 2 +- lib/ace/edit_session.js | 584 +++++++++--------- lib/ace/edit_session/fold.js | 2 +- lib/ace/edit_session/fold_line.js | 2 +- lib/ace/edit_session_test.js | 2 +- lib/ace/editor.js | 17 +- lib/ace/editor_change_document_test.js | 2 +- .../editor_highlight_selected_word_test.js | 2 +- lib/ace/editor_navigation_test.js | 2 +- lib/ace/editor_text_edit_test.js | 4 +- lib/ace/ext/static_highlight.js | 2 +- lib/ace/ext/static_highlight_test.js | 2 +- lib/ace/layer/marker.js | 2 +- lib/ace/layer/text_test.js | 2 +- lib/ace/lib/es5-shim.js | 2 +- lib/ace/lib/event_emitter.js | 2 +- lib/ace/lib/event_emitter_test.js | 2 +- lib/ace/lib/fixoldbrowsers.js | 2 +- lib/ace/lib/keys.js | 2 +- lib/ace/lib/net.js | 2 +- lib/ace/mode/behaviour.js | 2 +- lib/ace/mode/behaviour/cstyle.js | 2 +- lib/ace/mode/behaviour/xml.js | 2 +- lib/ace/mode/coffee.js | 2 +- lib/ace/mode/coffee/coffee-script.js | 2 +- lib/ace/mode/coffee/parser.js | 2 +- lib/ace/mode/coffee/parser_test.js | 2 +- lib/ace/mode/coffee_highlight_rules_test.js | 2 +- lib/ace/mode/coffee_worker.js | 2 +- lib/ace/mode/css_highlight_rules_test.js | 2 +- lib/ace/mode/css_test.js | 2 +- lib/ace/mode/css_worker.js | 2 +- lib/ace/mode/css_worker_test.js | 2 +- lib/ace/mode/folding/cstyle.js | 2 +- lib/ace/mode/folding/cstyle_test.js | 2 +- lib/ace/mode/folding/html.js | 2 +- lib/ace/mode/folding/html_test.js | 2 +- lib/ace/mode/folding/mixed.js | 2 +- lib/ace/mode/folding/pythonic.js | 2 +- lib/ace/mode/folding/pythonic_test.js | 2 +- lib/ace/mode/folding/xml.js | 2 +- lib/ace/mode/folding/xml_test.js | 2 +- lib/ace/mode/html_highlight_rules_test.js | 2 +- lib/ace/mode/html_test.js | 2 +- .../mode/javascript_highlight_rules_test.js | 2 +- lib/ace/mode/javascript_test.js | 2 +- lib/ace/mode/javascript_worker.js | 2 +- lib/ace/mode/javascript_worker_test.js | 2 +- lib/ace/mode/json.js | 2 +- lib/ace/mode/json/json_parse.js | 2 +- lib/ace/mode/json_worker.js | 2 +- lib/ace/mode/json_worker_test.js | 2 +- lib/ace/mode/lua.js | 2 +- lib/ace/mode/lua_highlight_rules.js | 14 +- lib/ace/mode/markdown.js | 2 +- lib/ace/mode/markdown_highlight_rules.js | 2 +- lib/ace/mode/python_test.js | 2 +- lib/ace/mode/text_test.js | 2 +- lib/ace/mode/xml_highlight_rules_test.js | 2 +- lib/ace/mode/xml_test.js | 2 +- lib/ace/model/editor.js | 2 +- lib/ace/mouse/default_gutter_handler.js | 2 +- lib/ace/mouse/fold_handler.js | 2 +- lib/ace/mouse/multi_select_handler.js | 2 +- lib/ace/multi_select.js | 4 +- lib/ace/multi_select_test.js | 4 +- lib/ace/narcissus/definitions.js | 2 +- lib/ace/narcissus/lexer.js | 2 +- lib/ace/narcissus/options.js | 2 +- lib/ace/narcissus/parser.js | 2 +- lib/ace/placeholder_test.js | 2 +- lib/ace/range_list_test.js | 2 +- lib/ace/range_test.js | 2 +- lib/ace/requirejs/text.js | 2 +- lib/ace/search_test.js | 2 +- lib/ace/selection.js | 187 +++--- lib/ace/test/all.js | 2 +- lib/ace/test/assertions.js | 2 +- lib/ace/test/asyncjs/assert.js | 2 +- lib/ace/test/asyncjs/async.js | 4 +- lib/ace/test/asyncjs/index.js | 2 +- lib/ace/test/asyncjs/test.js | 2 +- lib/ace/test/asyncjs/utils.js | 2 +- lib/ace/test/benchmark.js | 2 +- lib/ace/test/mockdom.js | 2 +- lib/ace/token_iterator_test.js | 2 +- lib/ace/unicode.js | 2 +- lib/ace/virtual_renderer_test.js | 2 +- lib/ace/worker/jshint.js | 2 +- lib/ace/worker/jslint.js | 2 +- lib/ace/worker/mirror.js | 2 +- 97 files changed, 577 insertions(+), 577 deletions(-) diff --git a/lib/ace/ace.js b/lib/ace/ace.js index 33fd1b7d..b573e393 100644 --- a/lib/ace/ace.js +++ b/lib/ace/ace.js @@ -98,4 +98,4 @@ exports.edit = function(el) { return editor; }; -}); \ No newline at end of file +}); diff --git a/lib/ace/anchor_test.js b/lib/ace/anchor_test.js index 112a46fe..62511c70 100644 --- a/lib/ace/anchor_test.js +++ b/lib/ace/anchor_test.js @@ -181,4 +181,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/commands/command_manager_test.js b/lib/ace/commands/command_manager_test.js index 752047fd..3ad11d59 100644 --- a/lib/ace/commands/command_manager_test.js +++ b/lib/ace/commands/command_manager_test.js @@ -190,4 +190,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file +} diff --git a/lib/ace/commands/multi_select_commands.js b/lib/ace/commands/multi_select_commands.js index cce05705..a3c1a16d 100644 --- a/lib/ace/commands/multi_select_commands.js +++ b/lib/ace/commands/multi_select_commands.js @@ -98,4 +98,4 @@ exports.multiEditCommands = {"singleSelection": "esc"}; var HashHandler = require("../keyboard/hash_handler").HashHandler; exports.keyboardHandler = new HashHandler(exports.multiEditCommands); -}); \ No newline at end of file +}); diff --git a/lib/ace/config.js b/lib/ace/config.js index c8b0a015..969fc7e4 100644 --- a/lib/ace/config.js +++ b/lib/ace/config.js @@ -125,4 +125,4 @@ function deHyphenate(str) { return str.replace(/-(.)/g, function(m, m1) { return m1.toUpperCase(); }); } -}); \ No newline at end of file +}); diff --git a/lib/ace/document.js b/lib/ace/document.js index bc6ac32e..87130012 100644 --- a/lib/ace/document.js +++ b/lib/ace/document.js @@ -78,11 +78,11 @@ var Document = function(text) { oop.implement(this, EventEmitter); /** - * Document.setValue(text) -> Void - * - text (String): The text to use - * + * Document.setValue(text) -> Void + * - text (String): The text to use + * * Replaces all the lines in the current `Document` with the value of `text`. - **/ + **/ this.setValue = function(text) { var len = this.getLength(); this.remove(new Range(0, 0, len, this.getLine(len-1).length)); @@ -90,21 +90,21 @@ var Document = function(text) { }; /** - * Document.getValue() -> String - * - * Returns all the lines in the document as a single string, split by the new line character. - **/ + * Document.getValue() -> String + * + * Returns all the lines in the document as a single string, split by the new line character. + **/ this.getValue = function() { return this.getAllLines().join(this.getNewLineCharacter()); }; /** - * Document.createAnchor(row, column) -> Anchor - * - row (Number): The row number to use + * Document.createAnchor(row, column) -> Anchor + * - row (Number): The row number to use * - column (Number): The column number to use * - * Creates a new `Anchor` to define a floating point in the document. - **/ + * Creates a new `Anchor` to define a floating point in the document. + **/ this.createAnchor = function(row, column) { return new Anchor(this, row, column); }; @@ -131,10 +131,10 @@ var Document = function(text) { /** internal, hide - * Document.$detectNewLine(text) -> Void - * - * - **/ + * Document.$detectNewLine(text) -> Void + * + * + **/ this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); if (match) { @@ -194,63 +194,63 @@ var Document = function(text) { }; /** - * Document.isNewLine(text) -> Boolean - * - text (String): The text to check + * Document.isNewLine(text) -> Boolean + * - text (String): The text to check * - * Returns `true` if `text` is a newline character (either `\r\n`, `\r`, or `\n`). + * Returns `true` if `text` is a newline character (either `\r\n`, `\r`, or `\n`). * - **/ + **/ this.isNewLine = function(text) { return (text == "\r\n" || text == "\r" || text == "\n"); }; /** - * Document.getLine(row) -> String - * - row (Number): The row index to retrieve - * + * Document.getLine(row) -> String + * - row (Number): The row index to retrieve + * * Returns a verbatim copy of the given line as it is in the document * - **/ + **/ this.getLine = function(row) { return this.$lines[row] || ""; }; /** - * Document.getLines(firstRow, lastRow) -> [String] - * - firstRow (Number): The first row index to retrieve + * Document.getLines(firstRow, lastRow) -> [String] + * - firstRow (Number): The first row index to retrieve * - lastRow (Number): The final row index to retrieve - * + * * Returns an array of strings of the rows between `firstRow` and `lastRow`. This function is inclusive of `lastRow`. * - **/ + **/ this.getLines = function(firstRow, lastRow) { return this.$lines.slice(firstRow, lastRow + 1); }; /** - * Document.getAllLines() -> [String] - * - * Returns all lines in the document as string array. Warning: The caller should not modify this array! - **/ + * Document.getAllLines() -> [String] + * + * Returns all lines in the document as string array. Warning: The caller should not modify this array! + **/ this.getAllLines = function() { return this.getLines(0, this.getLength()); }; /** - * Document.getLength() -> Number - * - * Returns the number of rows in the document. - **/ + * Document.getLength() -> Number + * + * Returns the number of rows in the document. + **/ this.getLength = function() { return this.$lines.length; }; /** - * Document.getTextRange(range) -> String - * - range (Range): The range to work with - * + * Document.getTextRange(range) -> String + * - range (Range): The range to work with + * * [Given a range within the document, this function returns all the text within that range as a single string.]{: #Document.getTextRange.desc} - **/ + **/ this.getTextRange = function(range) { if (range.start.row == range.end.row) { return this.$lines[range.start.row].substring(range.start.column, @@ -265,10 +265,10 @@ var Document = function(text) { }; /** internal, hide - * Document.$clipPosition(position) -> Number - * + * Document.$clipPosition(position) -> Number * - **/ + * + **/ this.$clipPosition = function(position) { var length = this.getLength(); if (position.row >= length) { @@ -279,14 +279,14 @@ var Document = function(text) { }; /** - * Document.insert(position, text) -> Number - * - position (Number): The position to start inserting at + * Document.insert(position, text) -> Number + * - position (Number): The position to start inserting at * - text (String): A chunk of text to insert - * + (Number): The position of the last line of `text`. If the length of `text` is 0, this function simply returns `position`. + * + (Number): The position of the last line of `text`. If the length of `text` is 0, this function simply returns `position`. * Inserts a block of `text` and the indicated `position`. * * - **/ + **/ this.insert = function(position, text) { if (!text || text.length === 0) return position; @@ -311,10 +311,10 @@ var Document = function(text) { }; /** - * Document.insertLines(row, lines) -> Object - * - row (Number): The index of the row to insert at + * Document.insertLines(row, lines) -> Object + * - row (Number): The index of the row to insert at * - lines (Array): An array of strings - * + (Object): Returns an object containing the final row and column, like this:
+ * + (Object): Returns an object containing the final row and column, like this:
* ```{row: endRow, column: 0}```
* If `lines` is empty, this function returns an object containing the current row, and column, like this:
* ```{row: row, column: 0}``` @@ -322,7 +322,7 @@ var Document = function(text) { * Inserts the elements in `lines` into the document, starting at the row index given by `row`. This method also triggers the `'change'` event. * * - **/ + **/ this.insertLines = function(row, lines) { if (lines.length == 0) return {row: row, column: 0}; @@ -342,16 +342,16 @@ var Document = function(text) { }; /** - * Document.insertNewLine(position) -> Object - * - position (String): The position to insert at - * + (Object): Returns an object containing the final row and column, like this:
+ * Document.insertNewLine(position) -> Object + * - position (String): The position to insert at + * + (Object): Returns an object containing the final row and column, like this:
* ```{row: endRow, column: 0}``` * * Inserts a new line into the document at the current row's `position`. This method also triggers the `'change'` event. * * * - **/ + **/ this.insertNewLine = function(position) { position = this.$clipPosition(position); var line = this.$lines[position.row] || ""; @@ -375,7 +375,7 @@ var Document = function(text) { }; /** - * Document.insertInLine(position, text) -> Object | Number + * Document.insertInLine(position, text) -> Object | Number * - position (Number): The position to insert at * - text (String): A chunk of text * + (Object): Returns an object containing the final row and column, like this:
@@ -386,7 +386,7 @@ var Document = function(text) { * * * - **/ + **/ this.insertInLine = function(position, text) { if (text.length == 0) return position; @@ -412,14 +412,14 @@ var Document = function(text) { }; /** - * Document.remove(range) -> Object - * - range (Range): A specified Range to remove - * + (Object): Returns the new `start` property of the range, which contains `startRow` and `startColumn`. If `range` is empty, this function returns the unmodified value of `range.start`. + * Document.remove(range) -> Object + * - range (Range): A specified Range to remove + * + (Object): Returns the new `start` property of the range, which contains `startRow` and `startColumn`. If `range` is empty, this function returns the unmodified value of `range.start`. * * Removes the `range` from the document. * * - **/ + **/ this.remove = function(range) { // clip to document range.start = this.$clipPosition(range.start); @@ -453,7 +453,7 @@ var Document = function(text) { }; /** - * Document.removeInLine(row, startColumn, endColumn) -> Object + * Document.removeInLine(row, startColumn, endColumn) -> Object * - row (Number): The row to remove from * - startColumn (Number): The column to start removing at * - endColumn (Number): The column to stop removing at @@ -483,15 +483,15 @@ var Document = function(text) { }; /** - * Document.removeLines(firstRow, lastRow) -> [String] - * - firstRow (Number): The first row to be removed + * Document.removeLines(firstRow, lastRow) -> [String] + * - firstRow (Number): The first row to be removed * - lastRow (Number): The last row to be removed * + ([String]): Returns all the removed lines. * * Removes a range of full lines. This method also triggers the `'change'` event. * * - **/ + **/ this.removeLines = function(firstRow, lastRow) { var range = new Range(firstRow, 0, lastRow + 1, 0); var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); @@ -507,12 +507,12 @@ var Document = function(text) { }; /** - * Document.removeNewLine(row) -> Void - * - row (Number): The row to check - * + * Document.removeNewLine(row) -> Void + * - row (Number): The row to check + * * Removes the new line between `row` and the row immediately following it. This method also triggers the `'change'` event. * - **/ + **/ this.removeNewLine = function(row) { var firstLine = this.getLine(row); var secondLine = this.getLine(row+1); @@ -531,9 +531,9 @@ var Document = function(text) { }; /** - * Document.replace(range, text) -> Object + * Document.replace(range, text) -> Object * - range (Range): A specified Range to replace - * - text (String): The new text to use as a replacement + * - text (String): The new text to use as a replacement * + (Object): Returns an object containing the final row and column, like this: * {row: endRow, column: 0} * If the text and range are empty, this function returns an object containing the current `range.start` value. @@ -541,7 +541,7 @@ var Document = function(text) { * * Replaces a range in the document with the new `text`. * - **/ + **/ this.replace = function(range, text) { if (text.length == 0 && range.isEmpty()) return range.start; @@ -563,10 +563,10 @@ var Document = function(text) { }; /** - * Document.applyDeltas(deltas) -> Void - * - * Applies all the changes previously accumulated. These can be either `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`. - **/ + * Document.applyDeltas(deltas) -> Void + * + * Applies all the changes previously accumulated. These can be either `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`. + **/ this.applyDeltas = function(deltas) { for (var i=0; i Void - * - * Reverts any changes previously applied. These can be either `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`. - **/ + * Document.revertDeltas(deltas) -> Void + * + * Reverts any changes previously applied. These can be either `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`. + **/ this.revertDeltas = function(deltas) { for (var i=deltas.length-1; i>=0; i--) { var delta = deltas[i]; diff --git a/lib/ace/document_test.js b/lib/ace/document_test.js index f1bd9511..f140e3d4 100644 --- a/lib/ace/document_test.js +++ b/lib/ace/document_test.js @@ -311,4 +311,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js index 8a57bcda..32070ce4 100644 --- a/lib/ace/edit_session.js +++ b/lib/ace/edit_session.js @@ -154,21 +154,21 @@ var EditSession = function(text, mode) { }; /** - * EditSession@onChangeFold(e) - * + * EditSession@onChangeFold(e) + * * Emitted when a code fold changes its state. * - **/ + **/ this.onChangeFold = function(e) { var fold = e.data; this.$resetRowCache(fold.start.row); }; /** - * EditSession@onChange(e) - * - * Emitted when the document changes. - **/ + * EditSession@onChange(e) + * + * Emitted when the document changes. + **/ this.onChange = function(e) { var delta = e.data; this.$modified = true; @@ -193,12 +193,12 @@ var EditSession = function(text, mode) { }; /** - * EditSession.setValue(text) - * - text (String): The new text to place + * EditSession.setValue(text) + * - text (String): The new text to place * * Sets the session text. - * - **/ + * + **/ this.setValue = function(text) { this.doc.setValue(text); this.selection.moveCursorTo(0, 0); @@ -229,16 +229,16 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getSelection() -> String - * - * Returns the string of the current selection. - **/ + * EditSession.getSelection() -> String + * + * Returns the string of the current selection. + **/ this.getSelection = function() { return this.selection; }; /** related to: BackgroundTokenizer.getState - * EditSession.getState(row) -> Array + * EditSession.getState(row) -> Array * - row (Number): The row to start at * * {:BackgroundTokenizer.getState} @@ -249,7 +249,7 @@ var EditSession = function(text, mode) { }; /** related to: BackgroundTokenizer.getTokens - * EditSession.getTokens(firstRow, lastRow) -> Array + * EditSession.getTokens(firstRow, lastRow) -> Array * - firstRow (Number): The row to start at * - lastRow (Number): The row to finish at * @@ -261,12 +261,12 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getTokenAt(row, column) -> Array - * - row (Number): The row number to retrieve from + * EditSession.getTokenAt(row, column) -> Array + * - row (Number): The row number to retrieve from * - column (Number): The column number to retrieve from * - * Returns an array of tokens at the indicated row and column. - **/ + * Returns an array of tokens at the indicated row and column. + **/ this.getTokenAt = function(row, column) { var tokens = this.bgTokenizer.getTokens(row, row)[0].tokens; var token, c = 0; @@ -289,11 +289,11 @@ var EditSession = function(text, mode) { }; /** - * EditSession.setUndoManager(undoManager) - * - undoManager (UndoManager): The new undo manager - * + * EditSession.setUndoManager(undoManager) + * - undoManager (UndoManager): The new undo manager + * * Sets the undo manager. - **/ + **/ this.setUndoManager = function(undoManager) { this.$undoManager = undoManager; this.$resetRowCache(0); @@ -307,10 +307,10 @@ var EditSession = function(text, mode) { if (undoManager) { var self = this; /** internal, hide - * EditSession.$syncInformUndoManager() - * - * - **/ + * EditSession.$syncInformUndoManager() + * + * + **/ this.$syncInformUndoManager = function() { self.$informUndoManager.cancel(); @@ -351,19 +351,19 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getUndoManager() -> UndoManager - * - * Returns the current undo manager. - **/ + * EditSession.getUndoManager() -> UndoManager + * + * Returns the current undo manager. + **/ this.getUndoManager = function() { return this.$undoManager || this.$defaultUndoManager; }, /** - * EditSession.getTabString() -> String - * - * Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by [[EditSession.getTabSize `getTabSize()`]]); otherwise it's simply `'\t'`. - **/ + * EditSession.getTabString() -> String + * + * Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by [[EditSession.getTabSize `getTabSize()`]]); otherwise it's simply `'\t'`. + **/ this.getTabString = function() { if (this.getUseSoftTabs()) { return lang.stringRepeat(" ", this.getTabSize()); @@ -374,12 +374,12 @@ var EditSession = function(text, mode) { this.$useSoftTabs = true; /** - * EditSession.setUseSoftTabs(useSoftTabs) - * - useSoftTabs (Boolean): Value indicating whether or not to use soft tabs - * + * EditSession.setUseSoftTabs(useSoftTabs) + * - useSoftTabs (Boolean): Value indicating whether or not to use soft tabs + * * Pass `true` to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character (`'\t'`). * - **/ + **/ this.setUseSoftTabs = function(useSoftTabs) { if (this.$useSoftTabs === useSoftTabs) return; @@ -387,22 +387,22 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getUseSoftTabs() -> Boolean - * - * Returns `true` if soft tabs are being used, `false` otherwise. + * EditSession.getUseSoftTabs() -> Boolean + * + * Returns `true` if soft tabs are being used, `false` otherwise. * - **/ + **/ this.getUseSoftTabs = function() { return this.$useSoftTabs; }; this.$tabSize = 4; /** - * EditSession.setTabSize(tabSize) - * - tabSize (Number): The new tab size - * + * EditSession.setTabSize(tabSize) + * - tabSize (Number): The new tab size + * * Set the number of spaces that define a soft tab; for example, passing in `4` transforms the soft tabs to be equivalent to four spaces. This function also emits the `changeTabSize` event. - **/ + **/ this.setTabSize = function(tabSize) { if (isNaN(tabSize) || this.$tabSize === tabSize) return; @@ -412,32 +412,32 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getTabSize() -> Number - * - * Returns the current tab size. - **/ + * EditSession.getTabSize() -> Number + * + * Returns the current tab size. + **/ this.getTabSize = function() { return this.$tabSize; }; /** - * EditSession.isTabStop(position) -> Boolean - * - position (Object): The position to check - * + * EditSession.isTabStop(position) -> Boolean + * - position (Object): The position to check + * * Returns `true` if the character at the position is a soft tab. - **/ + **/ this.isTabStop = function(position) { return this.$useSoftTabs && (position.column % this.$tabSize == 0); }; this.$overwrite = false; /** - * EditSession.setOverwrite(overwrite) - * - overwrite (Boolean): Defines wheter or not to set overwrites - * + * EditSession.setOverwrite(overwrite) + * - overwrite (Boolean): Defines wheter or not to set overwrites + * * Pass in `true` to enable overwrites in your session, or `false` to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of `overwrite` changes, this function also emites the `changeOverwrite` event. * - **/ + **/ this.setOverwrite = function(overwrite) { if (this.$overwrite == overwrite) return; @@ -446,39 +446,39 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getOverwrite() -> Boolean - * - * Returns `true` if overwrites are enabled; `false` otherwise. - **/ + * EditSession.getOverwrite() -> Boolean + * + * Returns `true` if overwrites are enabled; `false` otherwise. + **/ this.getOverwrite = function() { return this.$overwrite; }; /** - * EditSession.toggleOverwrite() - * - * Sets the value of overwrite to the opposite of whatever it currently is. - **/ + * EditSession.toggleOverwrite() + * + * Sets the value of overwrite to the opposite of whatever it currently is. + **/ this.toggleOverwrite = function() { this.setOverwrite(!this.$overwrite); }; /** - * EditSession.getBreakpoints() -> Array - * - * Returns an array of numbers, indicating which rows have breakpoints. - **/ + * EditSession.getBreakpoints() -> Array + * + * Returns an array of numbers, indicating which rows have breakpoints. + **/ this.getBreakpoints = function() { return this.$breakpoints; }; /** - * EditSession.setBreakpoints(rows) - * - rows (Array): An array of row indicies - * + * EditSession.setBreakpoints(rows) + * - rows (Array): An array of row indicies + * * Sets a breakpoint on every row number given by `rows`. This function also emites the `'changeBreakpoint'` event. * - **/ + **/ this.setBreakpoints = function(rows) { this.$breakpoints = []; for (var i=0; i Number - * - range (Range): Define the range of the marker + * EditSession.addMarker(range, clazz, type = "line", inFront) -> Number + * - range (Range): Define the range of the marker * - clazz (String): Set the CSS class for the marker * - type (Function | String): Identify the type of the marker * - inFront (Boolean): Set to `true` to establish a front marker * - * Adds a new marker to the given `Range`. If `inFront` is `true`, a front marker is defined, and the `'changeFrontMarker'` event fires; otherwise, the `'changeBackMarker'` event fires. + * Adds a new marker to the given `Range`. If `inFront` is `true`, a front marker is defined, and the `'changeFrontMarker'` event fires; otherwise, the `'changeBackMarker'` event fires. * - **/ + **/ this.addMarker = function(range, clazz, type, inFront) { var id = this.$markerId++; @@ -552,12 +552,12 @@ var EditSession = function(text, mode) { }; /** - * EditSession.removeMarker(markerId) - * - markerId (Number): A number representing a marker + * EditSession.removeMarker(markerId) + * - markerId (Number): A number representing a marker * * Removes the marker with the specified ID. If this marker was in front, the `'changeFrontMarker'` event is emitted. If the marker was in the back, the `'changeBackMarker'` event is emitted. - * - **/ + * + **/ this.removeMarker = function(markerId) { var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId]; if (!marker) @@ -571,12 +571,12 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getMarkers(inFront) -> Array - * - inFront (Boolean): If `true`, indicates you only want front markers; `false` indicates only back markers + * EditSession.getMarkers(inFront) -> Array + * - inFront (Boolean): If `true`, indicates you only want front markers; `false` indicates only back markers * * Returns an array containing the IDs of all the markers, either front or back. - * - **/ + * + **/ this.getMarkers = function(inFront) { return inFront ? this.$frontMarkers : this.$backMarkers; }; @@ -591,11 +591,11 @@ var EditSession = function(text, mode) { * } */ /** - * EditSession.setAnnotations(annotations) - * - annotations (Array): A list of annotations + * EditSession.setAnnotations(annotations) + * - annotations (Array): A list of annotations * - * Sets annotations for the `EditSession`. This functions emits the `'changeAnnotation'` event. - **/ + * Sets annotations for the `EditSession`. This functions emits the `'changeAnnotation'` event. + **/ this.setAnnotations = function(annotations) { this.$annotations = {}; for (var i=0; i Object - * - * Returns the annotations for the `EditSession`. - **/ + * EditSession.getAnnotations() -> Object + * + * Returns the annotations for the `EditSession`. + **/ this.getAnnotations = function() { return this.$annotations || {}; }; /** - * EditSession.clearAnnotations() - * - * Clears all the annotations for this session. This function also triggers the `'changeAnnotation'` event. - **/ + * EditSession.clearAnnotations() + * + * Clears all the annotations for this session. This function also triggers the `'changeAnnotation'` event. + **/ this.clearAnnotations = function() { this.$annotations = {}; this._emit("changeAnnotation", {}); }; /** internal, hide - * EditSession.$detectNewLine(text) - * - text (String): A block of text - * + * EditSession.$detectNewLine(text) + * - text (String): A block of text + * * If `text` contains either the newline (`\n`) or carriage-return ('\r') characters, `$autoNewLine` stores that value. * - **/ + **/ this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r?\n)/m); if (match) { @@ -645,13 +645,13 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getWordRange(row, column) -> Range - * - row (Number): The row to start at + * EditSession.getWordRange(row, column) -> Range + * - row (Number): The row to start at * - column (Number): The column to start at * - * Given a starting row and column, this method returns the `Range` of the first word boundary it finds. + * Given a starting row and column, this method returns the `Range` of the first word boundary it finds. * - **/ + **/ this.getWordRange = function(row, column) { var line = this.getLine(row); @@ -684,12 +684,12 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getAWordRange(row, column) -> Range - * - row (Number): The row number to start from + * EditSession.getAWordRange(row, column) -> Range + * - row (Number): The row number to start from * - column (Number): The column number to start from - * + * * Gets the range of a word, including its right whitespace. - **/ + **/ this.getAWordRange = function(row, column) { var wordRange = this.getWordRange(row, column); var line = this.getLine(wordRange.end.row); @@ -701,20 +701,20 @@ var EditSession = function(text, mode) { }; /** related to: Document.setNewLineMode - * EditSession.setNewLineMode(newLineMode) - * - newLineMode (String): {:Document.setNewLineMode.param} + * EditSession.setNewLineMode(newLineMode) + * - newLineMode (String): {:Document.setNewLineMode.param} * - * {:Document.setNewLineMode.desc} - **/ + * {:Document.setNewLineMode.desc} + **/ this.setNewLineMode = function(newLineMode) { this.doc.setNewLineMode(newLineMode); }; /** related to: Document.getNewLineMode - * EditSession.getNewLineMode() -> String - * - * Returns the current new line mode. - **/ + * EditSession.getNewLineMode() -> String + * + * Returns the current new line mode. + **/ this.getNewLineMode = function() { return this.doc.getNewLineMode(); }; @@ -722,12 +722,12 @@ var EditSession = function(text, mode) { this.$useWorker = true; /** - * EditSession.setUseWorker(useWorker) - * - useWorker (Boolean): Set to `true` to use a worker - * + * EditSession.setUseWorker(useWorker) + * - useWorker (Boolean): Set to `true` to use a worker + * * Identifies if you want to use a worker for the `EditSession`. * - **/ + **/ this.setUseWorker = function(useWorker) { if (this.$useWorker == useWorker) return; @@ -740,19 +740,19 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getUseWorker() -> Boolean - * - * Returns `true` if workers are being used. - **/ + * EditSession.getUseWorker() -> Boolean + * + * Returns `true` if workers are being used. + **/ this.getUseWorker = function() { return this.$useWorker; }; /** - * EditSession@onReloadTokenizer(e) - * - * Reloads all the tokens on the current session. This function calls [[BackgroundTokenizer.start `BackgroundTokenizer.start ()`]] to all the rows; it also emits the `'tokenizerUpdate'` event. - **/ + * EditSession@onReloadTokenizer(e) + * + * Reloads all the tokens on the current session. This function calls [[BackgroundTokenizer.start `BackgroundTokenizer.start ()`]] to all the rows; it also emits the `'tokenizerUpdate'` event. + **/ this.onReloadTokenizer = function(e) { var rows = e.data; this.bgTokenizer.start(rows.first); @@ -900,21 +900,21 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getMode() -> TextMode - * - * Returns the current text mode. - **/ + * EditSession.getMode() -> TextMode + * + * Returns the current text mode. + **/ this.getMode = function() { return this.$mode; }; this.$scrollTop = 0; /** - * EditSession.setScrollTop(scrollTop) - * - scrollTop (Number): The new scroll top value + * EditSession.setScrollTop(scrollTop) + * - scrollTop (Number): The new scroll top value * - * This function sets the scroll top value. It also emits the `'changeScrollTop'` event. - **/ + * This function sets the scroll top value. It also emits the `'changeScrollTop'` event. + **/ this.setScrollTop = function(scrollTop) { scrollTop = Math.round(Math.max(0, scrollTop)); if (this.$scrollTop === scrollTop) @@ -925,20 +925,20 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getScrollTop() -> Number - * - * [Returns the value of the distance between the top of the editor and the topmost part of the visible content.]{: #EditSession.getScrollTop} - **/ + * EditSession.getScrollTop() -> Number + * + * [Returns the value of the distance between the top of the editor and the topmost part of the visible content.]{: #EditSession.getScrollTop} + **/ this.getScrollTop = function() { return this.$scrollTop; }; this.$scrollLeft = 0; /** - * EditSession.setScrollLeft(scrollLeft) - * - * [Sets the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.setScrollLeft} - **/ + * EditSession.setScrollLeft(scrollLeft) + * + * [Sets the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.setScrollLeft} + **/ this.setScrollLeft = function(scrollLeft) { scrollLeft = Math.round(Math.max(0, scrollLeft)); if (this.$scrollLeft === scrollLeft) @@ -949,29 +949,29 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getScrollLeft() -> Number - * - * [Returns the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.getScrollLeft} - **/ + * EditSession.getScrollLeft() -> Number + * + * [Returns the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.getScrollLeft} + **/ this.getScrollLeft = function() { return this.$scrollLeft; }; /** - * EditSession.getWidth() -> Number - * - * Returns the width of the document. - **/ + * EditSession.getWidth() -> Number + * + * Returns the width of the document. + **/ this.getWidth = function() { this.$computeWidth(); return this.width; }; /** - * EditSession.getScreenWidth() -> Number - * - * Returns the width of the screen. - **/ + * EditSession.getScreenWidth() -> Number + * + * Returns the width of the screen. + **/ this.getScreenWidth = function() { this.$computeWidth(); return this.screenWidth; @@ -1017,18 +1017,18 @@ var EditSession = function(text, mode) { }; /** related to: Document.getLine - * EditSession.getLine(row) -> String - * - row (Number): The row to retrieve from - * + * EditSession.getLine(row) -> String + * - row (Number): The row to retrieve from + * * Returns a verbatim copy of the given line as it is in the document * - **/ + **/ this.getLine = function(row) { return this.doc.getLine(row); }; /** related to: Document.getLines - * EditSession.getLines(firstRow, lastRow) -> Array + * EditSession.getLines(firstRow, lastRow) -> Array * - firstRow (Number): The first row index to retrieve * - lastRow (Number): The final row index to retrieve * @@ -1040,7 +1040,7 @@ var EditSession = function(text, mode) { }; /** related to: Document.getLength - * EditSession.getLength()-> Number + * EditSession.getLength()-> Number * * Returns the number of rows in the document. **/ @@ -1049,7 +1049,7 @@ var EditSession = function(text, mode) { }; /** related to: Document.getTextRange - * EditSession.getTextRange(range) -> Array + * EditSession.getTextRange(range) -> Array * - range (String): The range to work with * * {:Document.getTextRange.desc} @@ -1059,7 +1059,7 @@ var EditSession = function(text, mode) { }; /** related to: Document.insert - * EditSession.insert(position, text) -> Number + * EditSession.insert(position, text) -> Number * - position (Number): The position to start inserting at * - text (String): A chunk of text to insert * + (Number): The position of the last line of `text`. If the length of `text` is 0, this function simply returns `position`. @@ -1073,7 +1073,7 @@ var EditSession = function(text, mode) { }; /** related to: Document.remove - * EditSession.remove(range) -> Object + * EditSession.remove(range) -> Object * - range (Range): A specified Range to remove * + (Object): The new `start` property of the range, which contains `startRow` and `startColumn`. If `range` is empty, this function returns the unmodified value of `range.start`. * @@ -1086,12 +1086,12 @@ var EditSession = function(text, mode) { }; /** - * EditSession.undoChanges(deltas, dontSelect) -> Range - * - deltas (Array): An array of previous changes + * EditSession.undoChanges(deltas, dontSelect) -> Range + * - deltas (Array): An array of previous changes * - dontSelect (Boolean): [If `true`, doesn't select the range of where the change occured]{: #dontSelect} * - * Reverts previous changes to your document. - **/ + * Reverts previous changes to your document. + **/ this.undoChanges = function(deltas, dontSelect) { if (!deltas.length) return; @@ -1119,12 +1119,12 @@ var EditSession = function(text, mode) { }; /** - * EditSession.redoChanges(deltas, dontSelect) -> Range - * - deltas (Array): An array of previous changes + * EditSession.redoChanges(deltas, dontSelect) -> Range + * - deltas (Array): An array of previous changes * - dontSelect (Boolean): {:dontSelect} * - * Re-implements a previously undone change to your document. - **/ + * Re-implements a previously undone change to your document. + **/ this.redoChanges = function(deltas, dontSelect) { if (!deltas.length) return; @@ -1148,20 +1148,20 @@ var EditSession = function(text, mode) { }; /** - * EditSession.setUndoSelect(enable) - * - enable (Boolean): If `true`, selects the range of the reinserted change + * EditSession.setUndoSelect(enable) + * - enable (Boolean): If `true`, selects the range of the reinserted change * - * ENables or disables highlighting of the range where an undo occured. - **/ + * ENables or disables highlighting of the range where an undo occured. + **/ this.setUndoSelect = function(enable) { this.$undoSelect = enable; }; /** internal, hide - * EditSession.$getUndoSelection(deltas, isUndo, lastUndoRange) -> Range - * - * - **/ + * EditSession.$getUndoSelection(deltas, isUndo, lastUndoRange) -> Range + * + * + **/ this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) { function isInsert(delta) { var insert = @@ -1217,7 +1217,7 @@ var EditSession = function(text, mode) { }, /** related to: Document.replace - * EditSession.replace(range, text) -> Object + * EditSession.replace(range, text) -> Object * - range (Range): A specified Range to replace * - text (String): The new text to use as a replacement * + (Object): Returns an object containing the final row and column, like this:
@@ -1235,17 +1235,17 @@ var EditSession = function(text, mode) { }; /** - * EditSession.moveText(fromRange, toPosition) -> Range - * - fromRange (Range): The range of text you want moved within the document + * EditSession.moveText(fromRange, toPosition) -> Range + * - fromRange (Range): The range of text you want moved within the document * - toPosition (Object): The location (row and column) where you want to move the text to * + (Range): The new range where the text was moved to. * Moves a range of text from the given range to the given position. `toPosition` is an object that looks like this: * * { row: newRowLocation, column: newColumnLocation } - * + * * * - **/ + **/ this.moveText = function(fromRange, toPosition) { var text = this.getTextRange(fromRange); this.remove(fromRange); @@ -1277,16 +1277,16 @@ var EditSession = function(text, mode) { }; /** - * EditSession.indentRows(startRow, endRow, indentString) - * - startRow (Number): Starting row + * EditSession.indentRows(startRow, endRow, indentString) + * - startRow (Number): Starting row * - endRow (Number): Ending row * - indentString (String): The indent token * - * Indents all the rows, from `startRow` to `endRow` (inclusive), by prefixing each row with the token in `indentString`. + * Indents all the rows, from `startRow` to `endRow` (inclusive), by prefixing each row with the token in `indentString`. * * If `indentString` contains the `'\t'` character, it's replaced by whatever is defined by [[EditSession.getTabString `getTabString()`]]. * - **/ + **/ this.indentRows = function(startRow, endRow, indentString) { indentString = indentString.replace(/\t/g, this.getTabString()); for (var row=startRow; row<=endRow; row++) @@ -1325,15 +1325,15 @@ var EditSession = function(text, mode) { }; /** related to: Document.insertLines - * EditSession.moveLinesUp(firstRow, lastRow) -> Number - * - firstRow (Number): The starting row to move up + * EditSession.moveLinesUp(firstRow, lastRow) -> Number + * - firstRow (Number): The starting row to move up * - lastRow (Number): The final row to move up - * + (Number): If `firstRow` is less-than or equal to 0, this function returns 0. Otherwise, on success, it returns -1. + * + (Number): If `firstRow` is less-than or equal to 0, this function returns 0. Otherwise, on success, it returns -1. * * Shifts all the lines in the document up one, starting from `firstRow` and ending at `lastRow`. * * - **/ + **/ this.moveLinesUp = function(firstRow, lastRow) { if (firstRow <= 0) return 0; @@ -1343,7 +1343,7 @@ var EditSession = function(text, mode) { }; /** related to: Document.insertLines - * EditSession.moveLinesDown(firstRow, lastRow) -> Number + * EditSession.moveLinesDown(firstRow, lastRow) -> Number * - firstRow (Number): The starting row to move down * - lastRow (Number): The final row to move down * + (Number): If `firstRow` is less-than or equal to 0, this function returns 0. Otherwise, on success, it returns -1. @@ -1360,16 +1360,16 @@ var EditSession = function(text, mode) { }; /** - * EditSession.duplicateLines(firstRow, lastRow) -> Number + * EditSession.duplicateLines(firstRow, lastRow) -> Number * - firstRow (Number): The starting row to duplicate * - lastRow (Number): The final row to duplicate - * + (Number): Returns the number of new rows added; in other words, `lastRow - firstRow + 1`. + * + (Number): Returns the number of new rows added; in other words, `lastRow - firstRow + 1`. * * Duplicates all the text between `firstRow` and `lastRow`. * * * - **/ + **/ this.duplicateLines = function(firstRow, lastRow) { var firstRow = this.$clipRowToDocument(firstRow); var lastRow = this.$clipRowToDocument(lastRow); @@ -1448,11 +1448,11 @@ var EditSession = function(text, mode) { }; /** - * EditSession.setUseWrapMode(useWrapMode) - * - useWrapMode (Boolean): Enable (or disable) wrap mode + * EditSession.setUseWrapMode(useWrapMode) + * - useWrapMode (Boolean): Enable (or disable) wrap mode * - * Sets whether or not line wrapping is enabled. If `useWrapMode` is different than the current value, the `'changeWrapMode'` event is emitted. - **/ + * Sets whether or not line wrapping is enabled. If `useWrapMode` is different than the current value, the `'changeWrapMode'` event is emitted. + **/ this.setUseWrapMode = function(useWrapMode) { if (useWrapMode != this.$useWrapMode) { this.$useWrapMode = useWrapMode; @@ -1474,10 +1474,10 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getUseWrapMode() -> Boolean - * - * Returns `true` if wrap mode is being used; `false` otherwise. - **/ + * EditSession.getUseWrapMode() -> Boolean + * + * Returns `true` if wrap mode is being used; `false` otherwise. + **/ this.getUseWrapMode = function() { return this.$useWrapMode; }; @@ -1487,12 +1487,12 @@ var EditSession = function(text, mode) { // in that direction. Or set both parameters to the same number to pin // the limit to that value. /** - * EditSession.setWrapLimitRange(min, max) - * - min (Number): The minimum wrap value (the left side wrap) + * EditSession.setWrapLimitRange(min, max) + * - min (Number): The minimum wrap value (the left side wrap) * - max (Number): The maximum wrap value (the right side wrap) * - * Sets the boundaries of wrap. Either value can be `null` to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for `min` or `max` are different, this method also emits the `'changeWrapMode'` event. - **/ + * Sets the boundaries of wrap. Either value can be `null` to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for `min` or `max` are different, this method also emits the `'changeWrapMode'` event. + **/ this.setWrapLimitRange = function(min, max) { if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) { this.$wrapLimitRange.min = min; @@ -1504,11 +1504,11 @@ var EditSession = function(text, mode) { }; /** internal, hide - * EditSession.adjustWrapLimit(desiredLimit) -> Boolean - * - desiredLimit (Number): The new wrap limit + * EditSession.adjustWrapLimit(desiredLimit) -> Boolean + * - desiredLimit (Number): The new wrap limit * - * This should generally only be called by the renderer when a resize is detected. - **/ + * This should generally only be called by the renderer when a resize is detected. + **/ this.adjustWrapLimit = function(desiredLimit) { var wrapLimit = this.$constrainWrapLimit(desiredLimit); if (wrapLimit != this.$wrapLimit && wrapLimit > 0) { @@ -1543,22 +1543,22 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getWrapLimit() -> Number - * - * Returns the value of wrap limit. - **/ + * EditSession.getWrapLimit() -> Number + * + * Returns the value of wrap limit. + **/ this.getWrapLimit = function() { return this.$wrapLimit; }; /** - * EditSession.getWrapLimitRange() -> Object - * - * Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this: + * EditSession.getWrapLimitRange() -> Object + * + * Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this: * * { min: wrapLimitRange_min, max: wrapLimitRange_max } * - **/ + **/ this.getWrapLimitRange = function() { // Avoid unexpected mutation by returning a copy return { @@ -1911,10 +1911,10 @@ var EditSession = function(text, mode) { } /** internal, hide - * EditSession.$getStringScreenWidth(str, maxScreenColumn, screenColumn) -> [Number] - * - str (String): The string to calculate the screen width of + * EditSession.$getStringScreenWidth(str, maxScreenColumn, screenColumn) -> [Number] + * - str (String): The string to calculate the screen width of * - maxScreenColumn (Number): - * - screenColumn (Number): + * - screenColumn (Number): * + ([Number]): Returns an `int[]` array with two elements:
* The first position indicates the number of columns for `str` on screen.
* The second value contains the position of the document column that this function read until. @@ -1922,7 +1922,7 @@ var EditSession = function(text, mode) { * Calculates the width of the string `str` on the screen while assuming that the string starts at the first column on the screen. * * - **/ + **/ this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) { if (maxScreenColumn == 0) { return [0, 0]; @@ -1955,12 +1955,12 @@ var EditSession = function(text, mode) { } /** - * EditSession.getRowLength(row) -> Number - * - row (Number): The row number to check + * EditSession.getRowLength(row) -> Number + * - row (Number): The row number to check * * - * Returns the length of the indicated row. - **/ + * Returns the length of the indicated row. + **/ this.getRowLength = function(row) { if (!this.$useWrapMode || !this.$wrapData[row]) { return 1; @@ -1970,8 +1970,8 @@ var EditSession = function(text, mode) { } /** - * EditSession.getRowHeight(config, row) -> Number - * - config (Object): An object containing a parameter indicating the `lineHeight`. + * EditSession.getRowHeight(config, row) -> Number + * - config (Object): An object containing a parameter indicating the `lineHeight`. * - row (Number): The row number to check * * Returns the height of the indicated row. This is mostly relevant for situations where wrapping occurs, and a single line spans across multiple rows. @@ -1982,40 +1982,40 @@ var EditSession = function(text, mode) { } /** internal, hide, related to: EditSession.documentToScreenColumn - * EditSession.getScreenLastRowColumn(screenRow) -> Number - * - screenRow (Number): The screen row to check + * EditSession.getScreenLastRowColumn(screenRow) -> Number + * - screenRow (Number): The screen row to check * - * Returns the column position (on screen) for the last character in the provided row. - **/ + * Returns the column position (on screen) for the last character in the provided row. + **/ this.getScreenLastRowColumn = function(screenRow) { var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE) return this.documentToScreenColumn(pos.row, pos.column); }; /** internal, hide - * EditSession.getDocumentLastRowColumn(docRow, docColumn) -> Number - * - docRow (Number): + * EditSession.getDocumentLastRowColumn(docRow, docColumn) -> Number + * - docRow (Number): * - docColumn (Number): * - **/ + **/ this.getDocumentLastRowColumn = function(docRow, docColumn) { var screenRow = this.documentToScreenRow(docRow, docColumn); return this.getScreenLastRowColumn(screenRow); }; /** internal, hide - * EditSession.getDocumentLastRowColumnPosition(docRow, docColumn) -> Number - * - **/ + * EditSession.getDocumentLastRowColumnPosition(docRow, docColumn) -> Number + * + **/ this.getDocumentLastRowColumnPosition = function(docRow, docColumn) { var screenRow = this.documentToScreenRow(docRow, docColumn); return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10); }; /** internal, hide - * EditSession.getRowSplitData(row) -> undefined | String + * EditSession.getRowSplitData(row) -> undefined | String * - **/ + **/ this.getRowSplitData = function(row) { if (!this.$useWrapMode) { return undefined; @@ -2025,41 +2025,41 @@ var EditSession = function(text, mode) { }; /** - * EditSession.getScreenTabSize(screenColumn) -> Number + * EditSession.getScreenTabSize(screenColumn) -> Number * - screenColumn (Number): The screen column to check - * - * The distance to the next tab stop at the specified screen column. - **/ + * + * The distance to the next tab stop at the specified screen column. + **/ this.getScreenTabSize = function(screenColumn) { return this.$tabSize - screenColumn % this.$tabSize; }; /** internal, hide - * EditSession.screenToDocumentRow(screenRow, screenColumn) -> Number - * - * - **/ + * EditSession.screenToDocumentRow(screenRow, screenColumn) -> Number + * + * + **/ this.screenToDocumentRow = function(screenRow, screenColumn) { return this.screenToDocumentPosition(screenRow, screenColumn).row; }; /** internal, hide - * EditSession.screenToDocumentColumn(screenRow, screenColumn) -> Number - * - * - **/ + * EditSession.screenToDocumentColumn(screenRow, screenColumn) -> Number + * + * + **/ this.screenToDocumentColumn = function(screenRow, screenColumn) { return this.screenToDocumentPosition(screenRow, screenColumn).column; }; /** related to: EditSession.documentToScreenPosition - * EditSession.screenToDocumentPosition(screenRow, screenColumn) -> Object - * - screenRow (Number): The screen row to check + * EditSession.screenToDocumentPosition(screenRow, screenColumn) -> Object + * - screenRow (Number): The screen row to check * - screenColumn (Number): The screen column to check - * + (Object): The object returned has two properties: `row` and `column`. + * + (Object): The object returned has two properties: `row` and `column`. * * Converts characters coordinates on the screen to characters coordinates within the document. [This takes into account code folding, word wrap, tab size, and any other visual modifications.]{: #conversionConsiderations} - * + * * **/ this.screenToDocumentPosition = function(screenRow, screenColumn) { @@ -2158,12 +2158,12 @@ var EditSession = function(text, mode) { }; /** related to: EditSession.screenToDocumentPosition - * EditSession.documentToScreenPosition(docRow, docColumn) -> Object - * - docRow (Number): The document row to check + * EditSession.documentToScreenPosition(docRow, docColumn) -> Object + * - docRow (Number): The document row to check * - docColumn (Number): The document column to check * + (Object): The object returned by this method has two properties: `row` and `column`. * - * Converts document coordinates to screen coordinates. {:conversionConsiderations} + * Converts document coordinates to screen coordinates. {:conversionConsiderations} * * * @@ -2272,28 +2272,28 @@ var EditSession = function(text, mode) { }; /** internal, hide - * EditSession.documentToScreenColumn(row, docColumn) -> Number - * - * - **/ + * EditSession.documentToScreenColumn(row, docColumn) -> Number + * + * + **/ this.documentToScreenColumn = function(row, docColumn) { return this.documentToScreenPosition(row, docColumn).column; }; /** internal, hide - * EditSession.documentToScreenRow(docRow, docColumn) -> Number - * - * - **/ + * EditSession.documentToScreenRow(docRow, docColumn) -> Number + * + * + **/ this.documentToScreenRow = function(docRow, docColumn) { return this.documentToScreenPosition(docRow, docColumn).row; }; /** - * EditSession.getScreenLength() -> Number - * - * Returns the length of the screen. - **/ + * EditSession.getScreenLength() -> Number + * + * Returns the length of the screen. + **/ this.getScreenLength = function() { var screenRows = 0; var fold = null; diff --git a/lib/ace/edit_session/fold.js b/lib/ace/edit_session/fold.js index f5602a86..923d78a0 100644 --- a/lib/ace/edit_session/fold.js +++ b/lib/ace/edit_session/fold.js @@ -113,4 +113,4 @@ var Fold = exports.Fold = function(range, placeholder) { }).call(Fold.prototype); -}); \ No newline at end of file +}); diff --git a/lib/ace/edit_session/fold_line.js b/lib/ace/edit_session/fold_line.js index 291fc80f..5206dffc 100644 --- a/lib/ace/edit_session/fold_line.js +++ b/lib/ace/edit_session/fold_line.js @@ -273,4 +273,4 @@ function FoldLine(foldData, folds) { }).call(FoldLine.prototype); exports.FoldLine = FoldLine; -}); \ No newline at end of file +}); diff --git a/lib/ace/edit_session_test.js b/lib/ace/edit_session_test.js index c27cf854..e2bc7fae 100644 --- a/lib/ace/edit_session_test.js +++ b/lib/ace/edit_session_test.js @@ -982,4 +982,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/editor.js b/lib/ace/editor.js index b0342377..53295878 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -475,17 +475,18 @@ var Editor = function(renderer, session) { session.$highlightLineMarker = null; if (this.$highlightActiveLine) { - var cursor = this.getCursorPosition(), - foldLine = this.session.getFoldLine(cursor.row); + var cursor = this.getCursorPosition(); + var foldLine = this.session.getFoldLine(cursor.row); if ((this.getSelectionStyle() != "line" || !this.selection.isMultiLine())) { - var range; - if (foldLine) { - range = new Range(foldLine.start.row, 0, foldLine.end.row + 1, 0); - } else { - range = new Range(cursor.row, 0, cursor.row+1, 0); + var range; + if (foldLine) { + range = new Range(foldLine.start.row, 0, foldLine.end.row + 1, 0); + } else { + range = new Range(cursor.row, 0, cursor.row+1, 0); + } + session.$highlightLineMarker = session.addMarker(range, "ace_active_line", "background"); } - session.$highlightLineMarker = session.addMarker(range, "ace_active_line", "background"); } }; diff --git a/lib/ace/editor_change_document_test.js b/lib/ace/editor_change_document_test.js index 4382fa16..9464202d 100644 --- a/lib/ace/editor_change_document_test.js +++ b/lib/ace/editor_change_document_test.js @@ -192,4 +192,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/editor_highlight_selected_word_test.js b/lib/ace/editor_highlight_selected_word_test.js index afd28f1c..b734b63e 100644 --- a/lib/ace/editor_highlight_selected_word_test.js +++ b/lib/ace/editor_highlight_selected_word_test.js @@ -212,4 +212,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file +} diff --git a/lib/ace/editor_navigation_test.js b/lib/ace/editor_navigation_test.js index 9a715445..ebd55a89 100644 --- a/lib/ace/editor_navigation_test.js +++ b/lib/ace/editor_navigation_test.js @@ -168,4 +168,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/editor_text_edit_test.js b/lib/ace/editor_text_edit_test.js index e1f5c234..171d40c7 100644 --- a/lib/ace/editor_text_edit_test.js +++ b/lib/ace/editor_text_edit_test.js @@ -151,7 +151,7 @@ module.exports = { editor.onTextInput("\n"); assert.equal(["", "{"].join("\n"), session.toString()); }, - + "test: outdent block" : function() { var session = new EditSession([" a12345", " b12345", " c12345"].join("\n")); var editor = new Editor(new MockRenderer(), session); @@ -559,4 +559,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/ext/static_highlight.js b/lib/ace/ext/static_highlight.js index a3e59f80..6aecc59c 100644 --- a/lib/ace/ext/static_highlight.js +++ b/lib/ace/ext/static_highlight.js @@ -95,4 +95,4 @@ exports.render = function(input, mode, theme, lineStart) { }; }; -}); \ No newline at end of file +}); diff --git a/lib/ace/ext/static_highlight_test.js b/lib/ace/ext/static_highlight_test.js index 47f6aa05..f6e5c909 100644 --- a/lib/ace/ext/static_highlight_test.js +++ b/lib/ace/ext/static_highlight_test.js @@ -78,4 +78,4 @@ function hello (a, b, c) {\n\ if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file +} diff --git a/lib/ace/layer/marker.js b/lib/ace/layer/marker.js index 04eeabc4..990af0ad 100644 --- a/lib/ace/layer/marker.js +++ b/lib/ace/layer/marker.js @@ -210,4 +210,4 @@ var Marker = function(parentEl) { exports.Marker = Marker; -}); \ No newline at end of file +}); diff --git a/lib/ace/layer/text_test.js b/lib/ace/layer/text_test.js index d58dd9c4..ef7d8cb6 100644 --- a/lib/ace/layer/text_test.js +++ b/lib/ace/layer/text_test.js @@ -103,4 +103,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/lib/es5-shim.js b/lib/ace/lib/es5-shim.js index 9c477f22..c0e7999c 100644 --- a/lib/ace/lib/es5-shim.js +++ b/lib/ace/lib/es5-shim.js @@ -1056,4 +1056,4 @@ var prepareString = "a"[0] != "a", } return Object(o); }; -}); \ No newline at end of file +}); diff --git a/lib/ace/lib/event_emitter.js b/lib/ace/lib/event_emitter.js index 98aa58c2..ccff4d6b 100644 --- a/lib/ace/lib/event_emitter.js +++ b/lib/ace/lib/event_emitter.js @@ -118,4 +118,4 @@ EventEmitter.removeAllListeners = function(eventName) { exports.EventEmitter = EventEmitter; -}); \ No newline at end of file +}); diff --git a/lib/ace/lib/event_emitter_test.js b/lib/ace/lib/event_emitter_test.js index c5229b2d..c5bc8a41 100644 --- a/lib/ace/lib/event_emitter_test.js +++ b/lib/ace/lib/event_emitter_test.js @@ -69,4 +69,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/lib/fixoldbrowsers.js b/lib/ace/lib/fixoldbrowsers.js index f711be62..2da9b100 100644 --- a/lib/ace/lib/fixoldbrowsers.js +++ b/lib/ace/lib/fixoldbrowsers.js @@ -16,4 +16,4 @@ define(function(require, exports, module) { require("./regexp"); require("./es5-shim"); -}); \ No newline at end of file +}); diff --git a/lib/ace/lib/keys.js b/lib/ace/lib/keys.js index e5121fb1..ef231039 100644 --- a/lib/ace/lib/keys.js +++ b/lib/ace/lib/keys.js @@ -126,4 +126,4 @@ exports.keyCodeToString = function(keyCode) { return (Keys[keyCode] || String.fromCharCode(keyCode)).toLowerCase(); } -}); \ No newline at end of file +}); diff --git a/lib/ace/lib/net.js b/lib/ace/lib/net.js index 8712b93c..bf4eefe0 100644 --- a/lib/ace/lib/net.js +++ b/lib/ace/lib/net.js @@ -59,4 +59,4 @@ exports.loadScript = function(path, callback) { s.onload = callback; }; -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/behaviour.js b/lib/ace/mode/behaviour.js index 36867c11..0559ff64 100644 --- a/lib/ace/mode/behaviour.js +++ b/lib/ace/mode/behaviour.js @@ -95,4 +95,4 @@ var Behaviour = function() { }).call(Behaviour.prototype); exports.Behaviour = Behaviour; -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/behaviour/cstyle.js b/lib/ace/mode/behaviour/cstyle.js index e4976add..3db838ad 100644 --- a/lib/ace/mode/behaviour/cstyle.js +++ b/lib/ace/mode/behaviour/cstyle.js @@ -222,4 +222,4 @@ var CstyleBehaviour = function () { oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/behaviour/xml.js b/lib/ace/mode/behaviour/xml.js index 568f1f28..bdfa9d82 100644 --- a/lib/ace/mode/behaviour/xml.js +++ b/lib/ace/mode/behaviour/xml.js @@ -89,4 +89,4 @@ var XmlBehaviour = function () { oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/coffee.js b/lib/ace/mode/coffee.js index 7ceffe2f..4afc2896 100644 --- a/lib/ace/mode/coffee.js +++ b/lib/ace/mode/coffee.js @@ -118,4 +118,4 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/coffee/coffee-script.js b/lib/ace/mode/coffee/coffee-script.js index a2ebce73..63bdcf5c 100644 --- a/lib/ace/mode/coffee/coffee-script.js +++ b/lib/ace/mode/coffee/coffee-script.js @@ -60,4 +60,4 @@ define(function(require, exports, module) { exports.parse = function(code) { return parser.parse(lexer.tokenize(code)); }; -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/coffee/parser.js b/lib/ace/mode/coffee/parser.js index 4b46f815..553179ca 100644 --- a/lib/ace/mode/coffee/parser.js +++ b/lib/ace/mode/coffee/parser.js @@ -600,4 +600,4 @@ parse: function parse(input) { module.exports = parser; -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/coffee/parser_test.js b/lib/ace/mode/coffee/parser_test.js index 692865c4..d7f70397 100644 --- a/lib/ace/mode/coffee/parser_test.js +++ b/lib/ace/mode/coffee/parser_test.js @@ -65,4 +65,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file +} diff --git a/lib/ace/mode/coffee_highlight_rules_test.js b/lib/ace/mode/coffee_highlight_rules_test.js index 546406a6..0393e659 100644 --- a/lib/ace/mode/coffee_highlight_rules_test.js +++ b/lib/ace/mode/coffee_highlight_rules_test.js @@ -69,4 +69,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file +} diff --git a/lib/ace/mode/coffee_worker.js b/lib/ace/mode/coffee_worker.js index 58150903..6268f192 100644 --- a/lib/ace/mode/coffee_worker.js +++ b/lib/ace/mode/coffee_worker.js @@ -89,4 +89,4 @@ oop.inherits(Worker, Mirror); }).call(Worker.prototype); -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/css_highlight_rules_test.js b/lib/ace/mode/css_highlight_rules_test.js index e30d2d8f..536babb3 100644 --- a/lib/ace/mode/css_highlight_rules_test.js +++ b/lib/ace/mode/css_highlight_rules_test.js @@ -96,4 +96,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/mode/css_test.js b/lib/ace/mode/css_test.js index 0e1f47fb..47605823 100644 --- a/lib/ace/mode/css_test.js +++ b/lib/ace/mode/css_test.js @@ -82,4 +82,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/mode/css_worker.js b/lib/ace/mode/css_worker.js index a5c53491..cb59dfef 100644 --- a/lib/ace/mode/css_worker.js +++ b/lib/ace/mode/css_worker.js @@ -63,4 +63,4 @@ oop.inherits(Worker, Mirror); }).call(Worker.prototype); -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/css_worker_test.js b/lib/ace/mode/css_worker_test.js index 6afe87b5..3b2ec67b 100644 --- a/lib/ace/mode/css_worker_test.js +++ b/lib/ace/mode/css_worker_test.js @@ -72,4 +72,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file +} diff --git a/lib/ace/mode/folding/cstyle.js b/lib/ace/mode/folding/cstyle.js index def02333..2a13c98d 100644 --- a/lib/ace/mode/folding/cstyle.js +++ b/lib/ace/mode/folding/cstyle.js @@ -92,4 +92,4 @@ oop.inherits(FoldMode, BaseFoldMode); }).call(FoldMode.prototype); -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/folding/cstyle_test.js b/lib/ace/mode/folding/cstyle_test.js index 2790d7f6..d23643c8 100644 --- a/lib/ace/mode/folding/cstyle_test.js +++ b/lib/ace/mode/folding/cstyle_test.js @@ -89,4 +89,4 @@ module.exports = { }); if (typeof module !== "undefined" && module === require.main) - require("asyncjs").test.testcase(module.exports).exec(); \ No newline at end of file + require("asyncjs").test.testcase(module.exports).exec(); diff --git a/lib/ace/mode/folding/html.js b/lib/ace/mode/folding/html.js index 03e4a456..30691138 100644 --- a/lib/ace/mode/folding/html.js +++ b/lib/ace/mode/folding/html.js @@ -83,4 +83,4 @@ var FoldMode = exports.FoldMode = function() { oop.inherits(FoldMode, MixedFoldMode); -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/folding/html_test.js b/lib/ace/mode/folding/html_test.js index dbf9dbec..06484979 100644 --- a/lib/ace/mode/folding/html_test.js +++ b/lib/ace/mode/folding/html_test.js @@ -166,4 +166,4 @@ module.exports = { }); if (typeof module !== "undefined" && module === require.main) - require("asyncjs").test.testcase(module.exports).exec(); \ No newline at end of file + require("asyncjs").test.testcase(module.exports).exec(); diff --git a/lib/ace/mode/folding/mixed.js b/lib/ace/mode/folding/mixed.js index 1bec524d..4ebc3acf 100644 --- a/lib/ace/mode/folding/mixed.js +++ b/lib/ace/mode/folding/mixed.js @@ -85,4 +85,4 @@ oop.inherits(FoldMode, BaseFoldMode); }).call(FoldMode.prototype); -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/folding/pythonic.js b/lib/ace/mode/folding/pythonic.js index 4bb25813..90ab2aad 100644 --- a/lib/ace/mode/folding/pythonic.js +++ b/lib/ace/mode/folding/pythonic.js @@ -62,4 +62,4 @@ oop.inherits(FoldMode, BaseFoldMode); }).call(FoldMode.prototype); -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/folding/pythonic_test.js b/lib/ace/mode/folding/pythonic_test.js index 595ff71a..6cfb1f77 100644 --- a/lib/ace/mode/folding/pythonic_test.js +++ b/lib/ace/mode/folding/pythonic_test.js @@ -99,4 +99,4 @@ module.exports = { }); if (typeof module !== "undefined" && module === require.main) - require("asyncjs").test.testcase(module.exports).exec(); \ No newline at end of file + require("asyncjs").test.testcase(module.exports).exec(); diff --git a/lib/ace/mode/folding/xml.js b/lib/ace/mode/folding/xml.js index 5bedd44b..bfe368d3 100644 --- a/lib/ace/mode/folding/xml.js +++ b/lib/ace/mode/folding/xml.js @@ -259,4 +259,4 @@ oop.inherits(FoldMode, BaseFoldMode); }).call(FoldMode.prototype); -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/folding/xml_test.js b/lib/ace/mode/folding/xml_test.js index 89cb9afb..49c95949 100644 --- a/lib/ace/mode/folding/xml_test.js +++ b/lib/ace/mode/folding/xml_test.js @@ -114,4 +114,4 @@ module.exports = { }); if (typeof module !== "undefined" && module === require.main) - require("asyncjs").test.testcase(module.exports).exec(); \ No newline at end of file + require("asyncjs").test.testcase(module.exports).exec(); diff --git a/lib/ace/mode/html_highlight_rules_test.js b/lib/ace/mode/html_highlight_rules_test.js index 998ca2fe..1b1431fc 100644 --- a/lib/ace/mode/html_highlight_rules_test.js +++ b/lib/ace/mode/html_highlight_rules_test.js @@ -90,4 +90,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file +} diff --git a/lib/ace/mode/html_test.js b/lib/ace/mode/html_test.js index cd7dd768..6b5549e8 100644 --- a/lib/ace/mode/html_test.js +++ b/lib/ace/mode/html_test.js @@ -71,4 +71,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/mode/javascript_highlight_rules_test.js b/lib/ace/mode/javascript_highlight_rules_test.js index 48fbbc15..dd9d2fb1 100644 --- a/lib/ace/mode/javascript_highlight_rules_test.js +++ b/lib/ace/mode/javascript_highlight_rules_test.js @@ -222,4 +222,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/mode/javascript_test.js b/lib/ace/mode/javascript_test.js index 3171a69b..20cf5935 100644 --- a/lib/ace/mode/javascript_test.js +++ b/lib/ace/mode/javascript_test.js @@ -162,4 +162,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/mode/javascript_worker.js b/lib/ace/mode/javascript_worker.js index 32e72bbb..d4aceb4b 100644 --- a/lib/ace/mode/javascript_worker.js +++ b/lib/ace/mode/javascript_worker.js @@ -85,4 +85,4 @@ oop.inherits(JavaScriptWorker, Mirror); }).call(JavaScriptWorker.prototype); -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/javascript_worker_test.js b/lib/ace/mode/javascript_worker_test.js index 841d1de4..dd66e2ec 100644 --- a/lib/ace/mode/javascript_worker_test.js +++ b/lib/ace/mode/javascript_worker_test.js @@ -96,4 +96,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file +} diff --git a/lib/ace/mode/json.js b/lib/ace/mode/json.js index fc0b9583..d6dd98d7 100644 --- a/lib/ace/mode/json.js +++ b/lib/ace/mode/json.js @@ -97,4 +97,4 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/json/json_parse.js b/lib/ace/mode/json/json_parse.js index 8374d2af..7841ab70 100644 --- a/lib/ace/mode/json/json_parse.js +++ b/lib/ace/mode/json/json_parse.js @@ -343,4 +343,4 @@ define(function(require, exports, module) { return reviver.call(holder, key, value); }({'': result}, '') : result; }; -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/json_worker.js b/lib/ace/mode/json_worker.js index 8759c0b9..ba207b3f 100644 --- a/lib/ace/mode/json_worker.js +++ b/lib/ace/mode/json_worker.js @@ -100,4 +100,4 @@ oop.inherits(JsonWorker, Mirror); }).call(JsonWorker.prototype); -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/json_worker_test.js b/lib/ace/mode/json_worker_test.js index 261fc9c5..3dea50e6 100644 --- a/lib/ace/mode/json_worker_test.js +++ b/lib/ace/mode/json_worker_test.js @@ -105,4 +105,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file +} diff --git a/lib/ace/mode/lua.js b/lib/ace/mode/lua.js index 79b57ff3..af61d48e 100644 --- a/lib/ace/mode/lua.js +++ b/lib/ace/mode/lua.js @@ -56,7 +56,7 @@ oop.inherits(Mode, TextMode); var tokenizedLine = this.$tokenizer.getLineTokens(line, state); var tokens = tokenizedLine.tokens; - + var chunks = ["function", "then", "do", "repeat"]; if (state == "start") { diff --git a/lib/ace/mode/lua_highlight_rules.js b/lib/ace/mode/lua_highlight_rules.js index 7eb6daeb..57e5fead 100644 --- a/lib/ace/mode/lua_highlight_rules.js +++ b/lib/ace/mode/lua_highlight_rules.js @@ -111,7 +111,7 @@ var LuaHighlightRules = function() { this.$rules = { "start" : - + // bracketed comments [{ token : "comment", // --[[ comment @@ -132,9 +132,9 @@ var LuaHighlightRules = function() { token : "comment", // --[====+[ comment regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]' }, - - // multiline bracketed comments - { + + // multiline bracketed comments + { token : "comment", // --[[ comment regex : strPre + '\\-\\-\\[\\[.*$', merge : true, @@ -184,7 +184,7 @@ var LuaHighlightRules = function() { }, // bracketed strings - { + { token : "string", // [[ string regex : strPre + '\\[\\[.*\\]\\]' }, { @@ -203,8 +203,8 @@ var LuaHighlightRules = function() { token : "string", // [====+[ string regex : strPre + '\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]' }, - - // multiline bracketed strings + + // multiline bracketed strings { token : "string", // [[ string regex : strPre + '\\[\\[.*$', diff --git a/lib/ace/mode/markdown.js b/lib/ace/mode/markdown.js index 04d8939f..99f7bf38 100644 --- a/lib/ace/mode/markdown.js +++ b/lib/ace/mode/markdown.js @@ -78,4 +78,4 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/markdown_highlight_rules.js b/lib/ace/mode/markdown_highlight_rules.js index 554d464e..09fcdff0 100644 --- a/lib/ace/mode/markdown_highlight_rules.js +++ b/lib/ace/mode/markdown_highlight_rules.js @@ -192,4 +192,4 @@ var MarkdownHighlightRules = function() { oop.inherits(MarkdownHighlightRules, TextHighlightRules); exports.MarkdownHighlightRules = MarkdownHighlightRules; -}); \ No newline at end of file +}); diff --git a/lib/ace/mode/python_test.js b/lib/ace/mode/python_test.js index 31655ee6..99a17b86 100644 --- a/lib/ace/mode/python_test.js +++ b/lib/ace/mode/python_test.js @@ -83,4 +83,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/mode/text_test.js b/lib/ace/mode/text_test.js index 0c8d1844..9b2650b1 100644 --- a/lib/ace/mode/text_test.js +++ b/lib/ace/mode/text_test.js @@ -68,4 +68,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/mode/xml_highlight_rules_test.js b/lib/ace/mode/xml_highlight_rules_test.js index 6dda1b02..8f764b2d 100644 --- a/lib/ace/mode/xml_highlight_rules_test.js +++ b/lib/ace/mode/xml_highlight_rules_test.js @@ -100,4 +100,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file +} diff --git a/lib/ace/mode/xml_test.js b/lib/ace/mode/xml_test.js index d27f6845..6985d4c5 100644 --- a/lib/ace/mode/xml_test.js +++ b/lib/ace/mode/xml_test.js @@ -79,4 +79,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file +} diff --git a/lib/ace/model/editor.js b/lib/ace/model/editor.js index 71ec3394..9c1414b8 100644 --- a/lib/ace/model/editor.js +++ b/lib/ace/model/editor.js @@ -67,4 +67,4 @@ var Editor = exports.Editor = function() { }).call(Editor.prototype); -}); \ No newline at end of file +}); diff --git a/lib/ace/mouse/default_gutter_handler.js b/lib/ace/mouse/default_gutter_handler.js index a13edb15..c9e69927 100644 --- a/lib/ace/mouse/default_gutter_handler.js +++ b/lib/ace/mouse/default_gutter_handler.js @@ -51,4 +51,4 @@ function GutterHandler(editor) { exports.GutterHandler = GutterHandler; -}); \ No newline at end of file +}); diff --git a/lib/ace/mouse/fold_handler.js b/lib/ace/mouse/fold_handler.js index 986ca934..ecde7769 100644 --- a/lib/ace/mouse/fold_handler.js +++ b/lib/ace/mouse/fold_handler.js @@ -68,4 +68,4 @@ function FoldHandler(editor) { exports.FoldHandler = FoldHandler; -}); \ No newline at end of file +}); diff --git a/lib/ace/mouse/multi_select_handler.js b/lib/ace/mouse/multi_select_handler.js index 24b25cd4..3019e397 100644 --- a/lib/ace/mouse/multi_select_handler.js +++ b/lib/ace/mouse/multi_select_handler.js @@ -164,4 +164,4 @@ function onMouseDown(e) { exports.onMouseDown = onMouseDown; -}); \ No newline at end of file +}); diff --git a/lib/ace/multi_select.js b/lib/ace/multi_select.js index cac65259..2fe9c421 100644 --- a/lib/ace/multi_select.js +++ b/lib/ace/multi_select.js @@ -320,7 +320,7 @@ var EditSession = require("./edit_session").EditSession; // extend Editor var Editor = require("./editor").Editor; (function() { - + /** extension * Editor.updateSelectionMarkers() * @@ -758,4 +758,4 @@ function addAltCursorListeners(editor){ exports.MultiSelect = MultiSelect; -}); \ No newline at end of file +}); diff --git a/lib/ace/multi_select_test.js b/lib/ace/multi_select_test.js index 8e0a4013..4fdac469 100644 --- a/lib/ace/multi_select_test.js +++ b/lib/ace/multi_select_test.js @@ -143,7 +143,7 @@ module.exports = { ]); editor = new Editor(new MockRenderer(), doc); MultiSelect(editor); - var selection = editor.selection; + var selection = editor.selection; var range1 = new Range(0, 2, 0, 4); editor.selection.fromOrientedRange(range1); @@ -168,4 +168,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/narcissus/definitions.js b/lib/ace/narcissus/definitions.js index 48a7c1e5..742f1c4f 100644 --- a/lib/ace/narcissus/definitions.js +++ b/lib/ace/narcissus/definitions.js @@ -693,4 +693,4 @@ exports.Dict = Dict; exports.WeakMap = _WeakMap; exports.Stack = Stack; -}); \ No newline at end of file +}); diff --git a/lib/ace/narcissus/lexer.js b/lib/ace/narcissus/lexer.js index de67ebdd..fff707c0 100644 --- a/lib/ace/narcissus/lexer.js +++ b/lib/ace/narcissus/lexer.js @@ -595,4 +595,4 @@ Tokenizer.prototype = { exports.isIdentifier = isIdentifier; exports.Tokenizer = Tokenizer; -}); \ No newline at end of file +}); diff --git a/lib/ace/narcissus/options.js b/lib/ace/narcissus/options.js index 7f617944..2793fcd2 100644 --- a/lib/ace/narcissus/options.js +++ b/lib/ace/narcissus/options.js @@ -58,4 +58,4 @@ exports.mozillaMode = true; // Allow experimental paren-free mode? exports.parenFreeMode = false; -}); \ No newline at end of file +}); diff --git a/lib/ace/narcissus/parser.js b/lib/ace/narcissus/parser.js index 4c93c63f..8cb9faa8 100644 --- a/lib/ace/narcissus/parser.js +++ b/lib/ace/narcissus/parser.js @@ -2069,4 +2069,4 @@ exports.Parser = Parser; exports.Module = Module; exports.Export = Export; -}); \ No newline at end of file +}); diff --git a/lib/ace/placeholder_test.js b/lib/ace/placeholder_test.js index fb1ddf01..cc9f15bb 100644 --- a/lib/ace/placeholder_test.js +++ b/lib/ace/placeholder_test.js @@ -161,4 +161,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/range_list_test.js b/lib/ace/range_list_test.js index 6c397369..e6304912 100644 --- a/lib/ace/range_list_test.js +++ b/lib/ace/range_list_test.js @@ -167,4 +167,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/range_test.js b/lib/ace/range_test.js index 5fbefdfe..d3d039b6 100644 --- a/lib/ace/range_test.js +++ b/lib/ace/range_test.js @@ -195,4 +195,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/requirejs/text.js b/lib/ace/requirejs/text.js index 78faee7a..cf7ef666 100644 --- a/lib/ace/requirejs/text.js +++ b/lib/ace/requirejs/text.js @@ -55,4 +55,4 @@ define(function (require, exports, module) { }; }); -})(); \ No newline at end of file +})(); diff --git a/lib/ace/search_test.js b/lib/ace/search_test.js index bf1f53c9..e1f02c46 100644 --- a/lib/ace/search_test.js +++ b/lib/ace/search_test.js @@ -417,4 +417,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/selection.js b/lib/ace/selection.js index 40124213..be534116 100644 --- a/lib/ace/selection.js +++ b/lib/ace/selection.js @@ -87,10 +87,10 @@ var Selection = function(session) { oop.implement(this, EventEmitter); /** - * Selection.isEmpty() -> Boolean - * - * Returns `true` if the selection is empty. - **/ + * Selection.isEmpty() -> Boolean + * + * Returns `true` if the selection is empty. + **/ this.isEmpty = function() { return (this.$isEmpty || ( this.selectionAnchor.row == this.selectionLead.row && @@ -99,10 +99,10 @@ var Selection = function(session) { }; /** - * Selection.isMultiLine() -> Boolean - * - * Returns `true` if the selection is a multi-line. - **/ + * Selection.isMultiLine() -> Boolean + * + * Returns `true` if the selection is a multi-line. + **/ this.isMultiLine = function() { if (this.isEmpty()) { return false; @@ -112,7 +112,7 @@ var Selection = function(session) { }; /** - * Selection.getCursor() -> Number + * Selection.getCursor() -> Number * * Gets the current position of the cursor. **/ @@ -121,12 +121,12 @@ var Selection = function(session) { }; /** - * Selection.setSelectionAnchor(row, column) - * - row (Number): The new row - * - column (Number): The new column + * Selection.setSelectionAnchor(row, column) + * - row (Number): The new row + * - column (Number): The new column * * Sets the row and column position of the anchor. This function also emits the `'changeSelection'` event. - **/ + **/ this.setSelectionAnchor = function(row, column) { this.selectionAnchor.setPosition(row, column); @@ -137,11 +137,11 @@ var Selection = function(session) { }; /** related to: Anchor.getPosition - * Selection.getSelectionAnchor() -> Object - * - * Returns an object containing the `row` and `column` of the calling selection anchor. + * Selection.getSelectionAnchor() -> Object + * + * Returns an object containing the `row` and `column` of the calling selection anchor. * - **/ + **/ this.getSelectionAnchor = function() { if (this.$isEmpty) return this.getSelectionLead() @@ -150,21 +150,21 @@ var Selection = function(session) { }; /** - * Selection.getSelectionLead() -> Object - * - * Returns an object containing the `row` and `column` of the calling selection lead. - **/ + * Selection.getSelectionLead() -> Object + * + * Returns an object containing the `row` and `column` of the calling selection lead. + **/ this.getSelectionLead = function() { return this.selectionLead.getPosition(); }; /** - * Selection.shiftSelection(columns) - * - columns (Number): The number of columns to shift by - * + * Selection.shiftSelection(columns) + * - columns (Number): The number of columns to shift by + * * Shifts the selection up (or down, if [[Selection.isBackwards `isBackwards()`]] is true) the given number of columns. * - **/ + **/ this.shiftSelection = function(columns) { if (this.$isEmpty) { this.moveCursorTo(this.selectionLead.row, this.selectionLead.column + columns); @@ -187,10 +187,10 @@ var Selection = function(session) { }; /** - * Selection.isBackwards() -> Boolean - * - * Returns `true` if the selection is going backwards in the document. - **/ + * Selection.isBackwards() -> Boolean + * + * Returns `true` if the selection is going backwards in the document. + **/ this.isBackwards = function() { var anchor = this.selectionAnchor; var lead = this.selectionLead; @@ -198,10 +198,10 @@ var Selection = function(session) { }; /** - * Selection.getRange() -> Range - * - * [Returns the [[Range `Range`]] for the selected text.]{: #Selection.getRange} - **/ + * Selection.getRange() -> Range + * + * [Returns the [[Range `Range`]] for the selected text.]{: #Selection.getRange} + **/ this.getRange = function() { var anchor = this.selectionAnchor; var lead = this.selectionLead; @@ -218,10 +218,10 @@ var Selection = function(session) { }; /** - * Selection.clearSelection() - * - * [Empties the selection (by de-selecting it). This function also emits the `'changeSelection'` event.]{: #Selection.clearSelection} - **/ + * Selection.clearSelection() + * + * [Empties the selection (by de-selecting it). This function also emits the `'changeSelection'` event.]{: #Selection.clearSelection} + **/ this.clearSelection = function() { if (!this.$isEmpty) { this.$isEmpty = true; @@ -230,10 +230,10 @@ var Selection = function(session) { }; /** - * Selection.selectAll() - * - * Selects all the text in the document. - **/ + * Selection.selectAll() + * + * Selects all the text in the document. + **/ this.selectAll = function() { var lastRow = this.doc.getLength() - 1; this.setSelectionAnchor(lastRow, this.doc.getLine(lastRow).length); @@ -241,13 +241,13 @@ var Selection = function(session) { }; /** - * Selection.setSelectionRange(range, reverse) - * - range (Range): The range of text to select - * - reverse (Boolean): Indicates if the range should go backwards (`true`) or not + * Selection.setSelectionRange(range, reverse) + * - range (Range): The range of text to select + * - reverse (Boolean): Indicates if the range should go backwards (`true`) or not * * Sets the selection to the provided range. * - **/ + **/ this.setSelectionRange = function(range, reverse) { if (reverse) { this.setSelectionAnchor(range.end.row, range.end.column); @@ -268,13 +268,13 @@ var Selection = function(session) { }; /** - * Selection.selectTo(row, column) - * - row (Number): The row to select to - * - column (Number): The column to select to + * Selection.selectTo(row, column) + * - row (Number): The row to select to + * - column (Number): The column to select to * * Moves the selection cursor to the indicated row and column. * - **/ + **/ this.selectTo = function(row, column) { this.$moveSelection(function() { this.moveCursorTo(row, column); @@ -282,12 +282,12 @@ var Selection = function(session) { }; /** - * Selection.selectToPosition(pos) - * - pos (Object): An object containing the row and column - * + * Selection.selectToPosition(pos) + * - pos (Object): An object containing the row and column + * * Moves the selection cursor to the row and column indicated by `pos`. * - **/ + **/ this.selectToPosition = function(pos) { this.$moveSelection(function() { this.moveCursorToPosition(pos); @@ -295,10 +295,10 @@ var Selection = function(session) { }; /** - * Selection.selectUp() - * - * Moves the selection up one row. - **/ + * Selection.selectUp() + * + * Moves the selection up one row. + **/ this.selectUp = function() { this.$moveSelection(this.moveCursorUp); }; @@ -331,10 +331,10 @@ var Selection = function(session) { }; /** - * Selection.selectLineStart() - * - * Moves the selection to the beginning of the current line. - **/ + * Selection.selectLineStart() + * + * Moves the selection to the beginning of the current line. + **/ this.selectLineStart = function() { this.$moveSelection(this.moveCursorLineStart); }; @@ -385,10 +385,10 @@ var Selection = function(session) { }; /** related to: EditSession.getWordRange - * Selection.selectWord() - * - * Moves the selection to highlight the entire word. - **/ + * Selection.selectWord() + * + * Moves the selection to highlight the entire word. + **/ this.getWordRange = function(row, column) { if (typeof column == "undefined") { var cursor = row || this.selectionLead; @@ -398,16 +398,15 @@ var Selection = function(session) { return this.session.getWordRange(row, column); }; ->>>>>>> ui/navbar this.selectWord = function() { this.setSelectionRange(this.getWordRange()); }; /** related to: EditSession.getAWordRange - * Selection.selectAWord() - * - * Selects a word, including its right whitespace. - **/ + * Selection.selectAWord() + * + * Selects a word, including its right whitespace. + **/ this.selectAWord = function() { var cursor = this.getCursor(); var range = this.session.getAWordRange(cursor.row, cursor.column); @@ -441,28 +440,28 @@ var Selection = function(session) { }; /** - * Selection.moveCursorUp() - * - * Moves the cursor up one row. - **/ + * Selection.moveCursorUp() + * + * Moves the cursor up one row. + **/ this.moveCursorUp = function() { this.moveCursorBy(-1, 0); }; /** - * Selection.moveCursorDown() + * Selection.moveCursorDown() * * Moves the cursor down one row. - **/ + **/ this.moveCursorDown = function() { this.moveCursorBy(1, 0); }; /** - * Selection.moveCursorLeft() + * Selection.moveCursorLeft() * * Moves the cursor left one column. - **/ + **/ this.moveCursorLeft = function() { var cursor = this.selectionLead.getPosition(), fold; @@ -485,7 +484,7 @@ var Selection = function(session) { }; /** - * Selection.moveCursorRight() + * Selection.moveCursorRight() * * Moves the cursor right one column. **/ @@ -511,7 +510,7 @@ var Selection = function(session) { }; /** - * Selection.moveCursorLineStart() + * Selection.moveCursorLineStart() * * Moves the cursor to the start of the line. **/ @@ -544,7 +543,7 @@ var Selection = function(session) { }; /** - * Selection.moveCursorLineEnd() + * Selection.moveCursorLineEnd() * * Moves the cursor to the end of the line. **/ @@ -559,7 +558,7 @@ var Selection = function(session) { }; /** - * Selection.moveCursorFileEnd() + * Selection.moveCursorFileEnd() * * Moves the cursor to the end of the file. **/ @@ -570,7 +569,7 @@ var Selection = function(session) { }; /** - * Selection.moveCursorFileStart() + * Selection.moveCursorFileStart() * * Moves the cursor to the start of the file. **/ @@ -626,7 +625,7 @@ var Selection = function(session) { }; /** - * Selection.moveCursorLongWordLeft() + * Selection.moveCursorLongWordLeft() * * Moves the cursor to the word on the left. **/ @@ -789,23 +788,23 @@ var Selection = function(session) { }; /** - * Selection.moveCursorToPosition(position) - * - position (Object): The position to move to - * + * Selection.moveCursorToPosition(position) + * - position (Object): The position to move to + * * Moves the selection to the position indicated by its `row` and `column`. - **/ + **/ this.moveCursorToPosition = function(position) { this.moveCursorTo(position.row, position.column); }; /** - * Selection.moveCursorTo(row, column, keepDesiredColumn) - * - row (Number): The row to move to - * - column (Number): The column to move to + * Selection.moveCursorTo(row, column, keepDesiredColumn) + * - row (Number): The row to move to + * - column (Number): The column to move to * - keepDesiredColumn (Boolean): [If `true`, the cursor move does not respect the previous column]{: #preventUpdateBool} * * Moves the cursor to the row and column provided. [If `preventUpdateDesiredColumn` is `true`, then the cursor stays in the same column position as its original point.]{: #preventUpdateBoolDesc} - **/ + **/ this.moveCursorTo = function(row, column, keepDesiredColumn) { // Ensure the row/column is not inside of a fold. var fold = this.session.getFoldAt(row, column, 1); @@ -823,13 +822,13 @@ var Selection = function(session) { }; /** - * Selection.moveCursorToScreen(row, column, keepDesiredColumn) + * Selection.moveCursorToScreen(row, column, keepDesiredColumn) * - row (Number): The row to move to * - column (Number): The column to move to * - keepDesiredColumn (Boolean): {:preventUpdateBool} * * Moves the cursor to the screen position indicated by row and column. {:preventUpdateBoolDesc} - **/ + **/ this.moveCursorToScreen = function(row, column, keepDesiredColumn) { var pos = this.session.screenToDocumentPosition(row, column); this.moveCursorTo(pos.row, pos.column, keepDesiredColumn); diff --git a/lib/ace/test/all.js b/lib/ace/test/all.js index 54942fa9..340f903d 100644 --- a/lib/ace/test/all.js +++ b/lib/ace/test/all.js @@ -39,4 +39,4 @@ require("amd-loader"); var test = require("asyncjs").test; -test.walkTestCases(__dirname + "/..").exec(); \ No newline at end of file +test.walkTestCases(__dirname + "/..").exec(); diff --git a/lib/ace/test/assertions.js b/lib/ace/test/assertions.js index ef04b8ce..861dbddc 100644 --- a/lib/ace/test/assertions.js +++ b/lib/ace/test/assertions.js @@ -60,4 +60,4 @@ exports.jsonEquals = function(foundJson, expectedJson) { module.exports = assert; -}); \ No newline at end of file +}); diff --git a/lib/ace/test/asyncjs/assert.js b/lib/ace/test/asyncjs/assert.js index 3ce1b31b..6cdc611a 100644 --- a/lib/ace/test/asyncjs/assert.js +++ b/lib/ace/test/asyncjs/assert.js @@ -310,4 +310,4 @@ assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) { assert.ifError = function(err) { if (err) {throw err;}}; -}); \ No newline at end of file +}); diff --git a/lib/ace/test/asyncjs/async.js b/lib/ace/test/asyncjs/async.js index 632d7c9d..e8265119 100644 --- a/lib/ace/test/asyncjs/async.js +++ b/lib/ace/test/asyncjs/async.js @@ -360,7 +360,7 @@ exports.Generator = function(source) { } this.end = function(breakOnError, callback) { - if (!callback) { + if (!callback) { callback = arguments[0] breakOnError = true } @@ -526,4 +526,4 @@ exports.plugin = function(members, constructors) { } } -}) \ No newline at end of file +}) diff --git a/lib/ace/test/asyncjs/index.js b/lib/ace/test/asyncjs/index.js index 8adee620..ed63914b 100644 --- a/lib/ace/test/asyncjs/index.js +++ b/lib/ace/test/asyncjs/index.js @@ -10,4 +10,4 @@ module.exports = require("./async") module.exports.test = require("./test") require("./utils") -}) \ No newline at end of file +}) diff --git a/lib/ace/test/asyncjs/test.js b/lib/ace/test/asyncjs/test.js index 7504a3e2..4374ef7c 100644 --- a/lib/ace/test/asyncjs/test.js +++ b/lib/ace/test/asyncjs/test.js @@ -192,4 +192,4 @@ exports.testcase = function(testcase, suiteName, timeout) { return async.list(tests, exports.TestGenerator) } -}) \ No newline at end of file +}) diff --git a/lib/ace/test/asyncjs/utils.js b/lib/ace/test/asyncjs/utils.js index d626b330..75fb3095 100644 --- a/lib/ace/test/asyncjs/utils.js +++ b/lib/ace/test/asyncjs/utils.js @@ -62,4 +62,4 @@ async.plugin({ } }) -}) \ No newline at end of file +}) diff --git a/lib/ace/test/benchmark.js b/lib/ace/test/benchmark.js index 512b7a1c..28adfcde 100644 --- a/lib/ace/test/benchmark.js +++ b/lib/ace/test/benchmark.js @@ -82,4 +82,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file +} diff --git a/lib/ace/test/mockdom.js b/lib/ace/test/mockdom.js index ec696d4c..54991fc5 100644 --- a/lib/ace/test/mockdom.js +++ b/lib/ace/test/mockdom.js @@ -7,4 +7,4 @@ global.document = browser.document; global.window = browser.window; global.self = browser.self; global.navigator = browser.navigator; -global.location = browser.location; \ No newline at end of file +global.location = browser.location; diff --git a/lib/ace/token_iterator_test.js b/lib/ace/token_iterator_test.js index 97ba9778..34f7801c 100644 --- a/lib/ace/token_iterator_test.js +++ b/lib/ace/token_iterator_test.js @@ -216,4 +216,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/unicode.js b/lib/ace/unicode.js index 0f0745c1..5c291744 100644 --- a/lib/ace/unicode.js +++ b/lib/ace/unicode.js @@ -104,4 +104,4 @@ function addUnicodePackage (pack) { exports.packages[name] = pack[name].replace(codePoint, "\\u$&"); }; -}); \ No newline at end of file +}); diff --git a/lib/ace/virtual_renderer_test.js b/lib/ace/virtual_renderer_test.js index 0d146971..59d5b089 100644 --- a/lib/ace/virtual_renderer_test.js +++ b/lib/ace/virtual_renderer_test.js @@ -88,4 +88,4 @@ module.exports = { if (typeof module !== "undefined" && module === require.main) { require("asyncjs").test.testcase(module.exports).exec() -} \ No newline at end of file +} diff --git a/lib/ace/worker/jshint.js b/lib/ace/worker/jshint.js index 345c909d..ad54b555 100644 --- a/lib/ace/worker/jshint.js +++ b/lib/ace/worker/jshint.js @@ -4466,4 +4466,4 @@ loop: for (;;) { if (typeof exports === 'object' && exports) exports.JSHINT = JSHINT; -}); \ No newline at end of file +}); diff --git a/lib/ace/worker/jslint.js b/lib/ace/worker/jslint.js index bbeaf5b5..9e7eb443 100644 --- a/lib/ace/worker/jslint.js +++ b/lib/ace/worker/jslint.js @@ -6393,4 +6393,4 @@ klass: do { return itself; }()); -}); \ No newline at end of file +}); diff --git a/lib/ace/worker/mirror.js b/lib/ace/worker/mirror.js index 76f6e73f..9e6dda73 100644 --- a/lib/ace/worker/mirror.js +++ b/lib/ace/worker/mirror.js @@ -40,4 +40,4 @@ var Mirror = exports.Mirror = function(sender) { }).call(Mirror.prototype); -}); \ No newline at end of file +});