session EditSession Required. The EditSession to refer to
+ Arguments renderer VirtualRenderer Required. Associated VirtualRenderer that draws everything
+session EditSession Required. The EditSession to refer to
@@ -444,7 +444,7 @@
Emitted whenever the document is changed.
-
Arguments e Object Required. Contains a single property, data, which has the delta of changes
+ Arguments e Object Required. Contains a single property, data, which has the delta of changes
@@ -471,7 +471,7 @@
Emitted when the selection style changes, via Editor.setSelectionStyle() .
-
Arguments data Object Required. Contains one property, data, which indicates the new selection style
+ Arguments data Object Required. Contains one property, data, which indicates the new selection style
@@ -498,7 +498,7 @@
Emitted whenever the EditSession changes.
-
Arguments e Object Required. An object with two properties, oldSession and session, that represent the old and new EditSession s.
+ Arguments e Object Required. An object with two properties, oldSession and session, that represent the old and new EditSession s.
@@ -525,7 +525,7 @@
Emitted when text is copied.
-
Arguments text String Required. The copied text
+ Arguments text String Required. The copied text
@@ -564,7 +564,7 @@
- Editor .on(" paste ", function( String text))
+ Editor .on(" paste ", function( Object e))
@@ -577,7 +577,7 @@
Emitted when text is pasted.
-
Arguments text String Required. The pasted text
+ Arguments e Object Required. An object which contains one property, text, that represents the text to be pasted. Editing this property will alter the text that is pasted.
@@ -610,7 +610,7 @@
Adds the selection and cursor.
-
Arguments orientedRange Range Required. A range containing a cursor
+ Arguments orientedRange Range Required. A range containing a cursor
@@ -920,9 +920,9 @@
Attempts to find needle within the document. For more information on options, see Search .
-
Arguments needle String Required. The text to search for (optional)
-options Object Required. An object defining various search properties
-animate Boolean Required. If true animate scrolling
+ Arguments needle String Required. The text to search for (optional)
+options Object Required. An object defining various search properties
+animate Boolean Required. If true animate scrolling
@@ -954,9 +954,9 @@
Finds and selects all the occurences of needle.
-
Arguments The String Required. text to find
-The Object Required. search options
-keeps Boolean Required.
+ Arguments
@@ -983,8 +983,8 @@
Performs another search for needle in the document. For more information on options, see Search .
-
Arguments options Object Required. search options
-animate Boolean Required. If true animate scrolling
+ Arguments options Object Required. search options
+animate Boolean Required. If true animate scrolling
@@ -1011,8 +1011,8 @@
Performs a search for needle backwards. For more information on options, see Search .
-
Arguments options Object Required. search options
-animate Boolean Required. If true animate scrolling
+ Arguments options Object Required. search options
+animate Boolean Required. If true animate scrolling
@@ -1064,8 +1064,8 @@
Executes a command for each selection range.
-
Arguments cmd String Required. The command to execute
-args String Required. Any arguments for the command
+ Arguments cmd String Required. The command to execute
+args String Required. Any arguments for the command
@@ -1523,8 +1523,8 @@
Works like EditSession.getTokenAt() , except it returns a number.
-
Arguments row Object Required.
-column Object Required.
+ Arguments
@@ -1966,9 +1966,9 @@
Moves the cursor to the specified line number, and also into the indiciated column.
-
Arguments lineNumber Number Required. The line number to go to
-column Number Required. A column number to go to
-animate Boolean Required. If true animates scolling
+ Arguments lineNumber Number Required. The line number to go to
+column Number Required. A column number to go to
+animate Boolean Required. If true animates scolling
@@ -2070,7 +2070,7 @@
Inserts text into wherever the cursor is pointing.
-
Arguments text String Required. The new text to add
+ Arguments text String Required. The new text to add
@@ -2132,7 +2132,7 @@
Indicates if the entire row is currently visible on the screen.
-
Arguments row Number Required. The row to check
+ Arguments row Number Required. The row to check
@@ -2164,7 +2164,7 @@
Indicates if the row is currently visible on the screen.
-
Arguments row Number Required. The row to check
+ Arguments row Number Required. The row to check
@@ -2191,7 +2191,7 @@
Moves the cursor's row and column to the next matching bracket.
-
Arguments select Object Required.
+ Arguments
@@ -2218,7 +2218,7 @@
If the character before the cursor is a number, this functions changes its value by amount.
-
Arguments amount Number Required. The value to change the numeral by (can be negative to decrease value)
+ Arguments amount Number Required. The value to change the numeral by (can be negative to decrease value)
@@ -2245,8 +2245,8 @@
Moves the cursor to the specified row and column. Note that this does not de-select the current selection.
-
Arguments row Number Required. The new row number
-column Number Required. The new column number
+ Arguments row Number Required. The new row number
+column Number Required. The new column number
@@ -2273,7 +2273,7 @@
Moves the cursor to the position indicated by pos.row and pos.column.
-
Arguments pos Object Required. An object with two properties, row and column
+ Arguments pos Object Required. An object with two properties, row and column
@@ -2384,7 +2384,7 @@
Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
-
Arguments times Number Required. The number of times to change navigation
+ Arguments times Number Required. The number of times to change navigation
@@ -2461,7 +2461,7 @@
Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
-
Arguments times Number Required. The number of times to change navigation
+ Arguments times Number Required. The number of times to change navigation
@@ -2538,7 +2538,7 @@
Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
-
Arguments times Number Required. The number of times to change navigation
+ Arguments times Number Required. The number of times to change navigation
@@ -2565,8 +2565,8 @@
Moves the cursor to the specified row and column. Note that this does de-select the current selection.
-
Arguments row Number Required. The new row number
-column Number Required. The new column number
+ Arguments row Number Required. The new row number
+column Number Required. The new column number
@@ -2593,7 +2593,7 @@
Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
-
Arguments times Number Required. The number of times to change navigation
+ Arguments times Number Required. The number of times to change navigation
@@ -3105,7 +3105,7 @@
Called whenever a text "paste" happens.
-
Arguments text String Required. The pasted text
+ Arguments text String Required. The pasted text
@@ -3277,7 +3277,7 @@
Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
-
Arguments dir String Required. The direction of the deletion to occur, either "left" or "right"
+ Arguments dir String Required. The direction of the deletion to occur, either "left" or "right"
@@ -3329,7 +3329,7 @@
Removes the selection marker.
-
Arguments The Range Required. selection range added with addSelectionMarker() .
+ Arguments
@@ -3456,8 +3456,8 @@
Replaces the first occurance of options.needle with the value in replacement.
-
Arguments replacement String Required. The text to replace with
-options Object Required. The Search options to use
+ Arguments replacement String Required. The text to replace with
+options Object Required. The Search options to use
@@ -3484,8 +3484,8 @@
Replaces all occurances of options.needle with the value in replacement.
-
Arguments replacement String Required. The text to replace with
-options Object Required. The Search options to use
+ Arguments replacement String Required. The text to replace with
+options Object Required. The Search options to use
@@ -3512,7 +3512,7 @@
Triggers a resize of the editor.
-
Arguments force Boolean Required. If true, recomputes the size, even if the height and width haven't changed
+ Arguments force Boolean Required. If true, recomputes the size, even if the height and width haven't changed
@@ -3613,10 +3613,10 @@
Scrolls to a line. If center is true, it puts the line in middle of screen (or attempts to).
-
Arguments line Number Required. The line to scroll to
-center Boolean Required. If true
-animate Boolean Required. If true animates scrolling
-callback Function Required. Function to be called when the animation has finished
+ Arguments line Number Required. The line to scroll to
+center Boolean Required. If true
+animate Boolean Required. If true animates scrolling
+callback Function Required. Function to be called when the animation has finished
@@ -3643,7 +3643,7 @@
Moves the editor to the specified row.
-
Arguments row Object Required.
+ Arguments
@@ -3695,8 +3695,8 @@
Finds the next occurence of text in an active selection and adds it to the selections.
-
Arguments dir Number Required. The direction of lines to select: -1 for up, 1 for down
-skip Boolean Required. If true, removes the active selection range
+ Arguments dir Number Required. The direction of lines to select: -1 for up, 1 for down
+skip Boolean Required. If true, removes the active selection range
@@ -3723,8 +3723,8 @@
Adds a cursor above or below the active cursor.
-
Arguments dir Number Required. The direction of lines to select: -1 for up, 1 for down
-skip Boolean Required. If true, removes the active selection range
+ Arguments dir Number Required. The direction of lines to select: -1 for up, 1 for down
+skip Boolean Required. If true, removes the active selection range
@@ -3825,7 +3825,7 @@
Specifies whether to use behaviors or not. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
-
Arguments enabled Boolean Required. Enables or disables behaviors
+ Arguments enabled Boolean Required. Enables or disables behaviors
@@ -3876,7 +3876,7 @@
Sets the delay (in milliseconds) of the mouse drag.
-
Arguments dragDelay Number Required. A value indicating the new delay
+ Arguments dragDelay Number Required. A value indicating the new delay
@@ -3927,7 +3927,7 @@
Set a new font size (in pixels) for the editor text.
-
Arguments size Number Required. A font size
+ Arguments size Number Required. A font size
@@ -3954,7 +3954,7 @@
Determines whether or not the current line should be highlighted.
-
Arguments shouldHighlight Boolean Required. Set to true to highlight the current line
+ Arguments shouldHighlight Boolean Required. Set to true to highlight the current line
@@ -4005,7 +4005,7 @@
Determines if the currently selected word should be highlighted.
-
Arguments shouldHighlight Boolean Required. Set to true to highlight the currently selected word
+ Arguments shouldHighlight Boolean Required. Set to true to highlight the currently selected word
@@ -4032,7 +4032,7 @@
Sets a new key handler, such as "vim" or "windows".
-
Arguments keyboardHandler String Required. The new key handler
+ Arguments keyboardHandler String Required. The new key handler
@@ -4059,7 +4059,7 @@
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.
-
Arguments overwrite Boolean Required. Defines wheter or not to set overwrites
+ Arguments overwrite Boolean Required. Defines wheter or not to set overwrites
@@ -4086,7 +4086,7 @@
Sets the column defining where the print margin should be.
-
Arguments showPrintMargin Number Required. Specifies the new print margin
+ Arguments showPrintMargin Number Required. Specifies the new print margin
@@ -4113,7 +4113,7 @@
If readOnly is true, then the editor is set to read-only mode, and none of the content can change.
-
Arguments readOnly Boolean Required. Specifies whether the editor can be modified or not
+ Arguments readOnly Boolean Required. Specifies whether the editor can be modified or not
@@ -4140,7 +4140,7 @@
Sets how fast the mouse scrolling should do.
-
Arguments speed Number Required. A value indicating the new speed (in milliseconds)
+ Arguments speed Number Required. A value indicating the new speed (in milliseconds)
@@ -4170,7 +4170,7 @@
although this code change in the future.
This function also emits the 'changeSelectionStyle' event.
- Arguments style String Required. The new selection style
+ Arguments style String Required. The new selection style
@@ -4197,7 +4197,7 @@ although this code change in the future.
Sets a new editsession to use. This method also emits the 'changeSession' event.
-
Arguments session EditSession Required. The new session to use
+ Arguments
@@ -4224,7 +4224,7 @@ although this code change in the future.
Indicates whether the fold widgets are shown or not.
-
Arguments show Boolean Required. Specifies whether the fold widgets are shown
+ Arguments show Boolean Required. Specifies whether the fold widgets are shown
@@ -4251,7 +4251,7 @@ although this code change in the future.
If showInvisibles is set to true, invisible characters—like spaces or new lines—are show in the editor.
-
Arguments showInvisibles Boolean Required. Specifies whether or not to show invisible characters
+ Arguments showInvisibles Boolean Required. Specifies whether or not to show invisible characters
@@ -4278,7 +4278,7 @@ although this code change in the future.
If showPrintMargin is set to true, the print margin is shown in the editor.
-
Arguments showPrintMargin Boolean Required. Specifies whether or not to show the print margin
+ Arguments showPrintMargin Boolean Required. Specifies whether or not to show the print margin
@@ -4305,7 +4305,7 @@ although this code change in the future.
Adds a new class, style, to the editor.
-
Arguments style String Required. A class name
+ Arguments style String Required. A class name
@@ -4332,7 +4332,7 @@ although this code change in the future.
Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
-
Arguments theme String Required. The path to a theme
+ Arguments theme String Required. The path to a theme
@@ -4364,8 +4364,8 @@ although this code change in the future.
Sets the current document to val.
-
Arguments val String Required. The new value to set for the document
-cursorPos Number Required. Where to set the new value. undefined or 0 is selectAll, -1 is at the document start, and 1 is at the end
+ Arguments val String Required. The new value to set for the document
+cursorPos Number Required. Where to set the new value. undefined or 0 is selectAll, -1 is at the document start, and 1 is at the end
@@ -4394,7 +4394,7 @@ when such a character is typed in.
Specifies whether to use wrapping behaviors or not, i.e. automatically wrapping the selection with characters such as brackets
when such a character is typed in.
-
Arguments enabled Boolean Required. Enables or disables wrapping behaviors
+ Arguments enabled Boolean Required. Enables or disables wrapping behaviors
@@ -4595,7 +4595,7 @@ when such a character is typed in.
Transposes the selected ranges.
-
Arguments dir Number Required. The direction to rotate selections
+ Arguments dir Number Required. The direction to rotate selections
@@ -4647,7 +4647,7 @@ when such a character is typed in.
Removes the class style from the editor.
-
Arguments style Object Required.
+ Arguments
diff --git a/build b/build
index 17c02716..a4e495d8 160000
--- a/build
+++ b/build
@@ -1 +1 @@
-Subproject commit 17c02716b7f116c7920f8ef07c8c2b0e20d77ec0
+Subproject commit a4e495d8901876c6bafe3870a35cb8e32c827e97
diff --git a/build_support/mini_require.js b/build_support/mini_require.js
index 88937f35..1ecbb78b 100644
--- a/build_support/mini_require.js
+++ b/build_support/mini_require.js
@@ -38,69 +38,62 @@
var ACE_NAMESPACE = "";
-var global = (function() {
- return this;
-})();
+var global = (function() { return this; })();
+if (!global && typeof window != "undefined") global = window; // strict mode
if (!ACE_NAMESPACE && typeof requirejs !== "undefined")
return;
-var _define = function(module, deps, payload) {
- if (typeof module !== 'string') {
- if (_define.original)
- _define.original.apply(window, arguments);
+var define = function(module, deps, payload) {
+ if (typeof module !== "string") {
+ if (define.original)
+ define.original.apply(this, arguments);
else {
- console.error('dropping module because define wasn\'t a string.');
+ console.error("dropping module because define wasn\'t a string.");
console.trace();
}
return;
}
-
if (arguments.length == 2)
payload = deps;
-
- if (!_define.modules) {
- _define.modules = {};
- _define.payloads = {};
+ if (!define.modules[module]) {
+ define.payloads[module] = payload;
+ define.modules[module] = null;
}
-
- _define.payloads[module] = payload;
- _define.modules[module] = null;
};
+define.modules = {};
+define.payloads = {};
+
/**
* Get at functionality define()ed using the function above
*/
var _require = function(parentId, module, callback) {
- if (Object.prototype.toString.call(module) === "[object Array]") {
+ if (typeof module === "string") {
+ var payload = lookup(parentId, module);
+ if (payload != undefined) {
+ callback && callback();
+ return payload;
+ }
+ } else if (Object.prototype.toString.call(module) === "[object Array]") {
var params = [];
for (var i = 0, l = module.length; i < l; ++i) {
var dep = lookup(parentId, module[i]);
- if (!dep && _require.original)
- return _require.original.apply(window, arguments);
+ if (dep == undefined && require.original)
+ return;
params.push(dep);
}
- if (callback) {
- callback.apply(null, params);
- }
+ return callback && callback.apply(null, params) || true;
}
- else if (typeof module === 'string') {
- var payload = lookup(parentId, module);
- if (!payload && _require.original)
- return _require.original.apply(window, arguments);
+};
- if (callback) {
- callback();
- }
-
- return payload;
- }
- else {
- if (_require.original)
- return _require.original.apply(window, arguments);
- }
+var require = function(module, callback) {
+ var packagedModule = _require("", module, callback);
+ if (packagedModule == undefined && require.original)
+ return require.original.apply(this, arguments);
+ return packagedModule;
};
var normalizeModule = function(parentId, moduleName) {
@@ -119,7 +112,6 @@ var normalizeModule = function(parentId, moduleName) {
moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
}
}
-
return moduleName;
};
@@ -128,12 +120,11 @@ var normalizeModule = function(parentId, moduleName) {
* definition function if needed.
*/
var lookup = function(parentId, moduleName) {
-
moduleName = normalizeModule(parentId, moduleName);
- var module = _define.modules[moduleName];
+ var module = define.modules[moduleName];
if (!module) {
- module = _define.payloads[moduleName];
+ module = define.payloads[moduleName];
if (typeof module === 'function') {
var exports = {};
var mod = {
@@ -149,19 +140,15 @@ var lookup = function(parentId, moduleName) {
var returnValue = module(req, exports, mod);
exports = returnValue || mod.exports;
- _define.modules[moduleName] = exports;
- delete _define.payloads[moduleName];
+ define.modules[moduleName] = exports;
+ delete define.payloads[moduleName];
}
- module = _define.modules[moduleName] = exports || module;
+ module = define.modules[moduleName] = exports || module;
}
return module;
};
function exportAce(ns) {
- var require = function(module, callback) {
- return _require("", module, callback);
- };
-
var root = global;
if (ns) {
if (!global[ns])
@@ -170,13 +157,13 @@ function exportAce(ns) {
}
if (!root.define || !root.define.packaged) {
- _define.original = root.define;
- root.define = _define;
+ define.original = root.define;
+ root.define = define;
root.define.packaged = true;
}
if (!root.require || !root.require.packaged) {
- _require.original = root.require;
+ require.original = root.require;
root.require = require;
root.require.packaged = true;
}
diff --git a/demo/autoresize.html b/demo/autoresize.html
index 73a87599..b0464ecd 100644
--- a/demo/autoresize.html
+++ b/demo/autoresize.html
@@ -7,14 +7,13 @@
@@ -24,6 +23,8 @@
minHeight = 2 lines
+
+
@@ -46,6 +47,13 @@ require(["ace/ace"], function(ace) {
editor2.setOption("maxLines", 30);
editor2.setOption("minLines", 2);
+ var editor = ace.edit("editor3");
+ editor.setOptions({
+ autoScrollEditorIntoView: true,
+ maxLines: 8
+ });
+ editor.renderer.setScrollMargin(10, 10, 10, 10);
+
var editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow");
editor.session.setMode("ace/mode/html");
diff --git a/demo/emmet.html b/demo/emmet.html
index 122085d9..bd0d4abe 100644
--- a/demo/emmet.html
+++ b/demo/emmet.html
@@ -23,7 +23,7 @@
-
+
+
+
+
+ Toggle editor
+
+
+
+
+