remove undefined editor variable
This commit is contained in:
parent
9e85280af5
commit
fed582bda6
2 changed files with 5 additions and 11 deletions
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
|
|
||||||
define(function(require, exports, module) {
|
define(function(require, exports, module) {
|
||||||
"never use strict";
|
"use strict";
|
||||||
|
|
||||||
require("ace/lib/fixoldbrowsers");
|
require("ace/lib/fixoldbrowsers");
|
||||||
require("ace/config").init();
|
require("ace/config").init();
|
||||||
|
|
@ -265,7 +265,7 @@ split.on("focus", function(editor) {
|
||||||
});
|
});
|
||||||
env.split = split;
|
env.split = split;
|
||||||
window.env = env;
|
window.env = env;
|
||||||
window.editor = window.ace = env.editor;
|
window.ace = env.editor;
|
||||||
env.editor.setAnimatedScroll(true);
|
env.editor.setAnimatedScroll(true);
|
||||||
|
|
||||||
var consoleEl = dom.createElement("div");
|
var consoleEl = dom.createElement("div");
|
||||||
|
|
@ -339,12 +339,6 @@ commands.addCommand({
|
||||||
exec: function() {alert("Fake Save File");}
|
exec: function() {alert("Fake Save File");}
|
||||||
});
|
});
|
||||||
|
|
||||||
commands.addCommand({
|
|
||||||
name: "print",
|
|
||||||
bindKey: {win: "Ctrl-P", mac: "Command-P"},
|
|
||||||
exec: function(editor) {editor.session.setValue("please,\ndo not waste paper\n");}
|
|
||||||
});
|
|
||||||
|
|
||||||
var keybindings = {
|
var keybindings = {
|
||||||
// Null = use "default" keymapping
|
// Null = use "default" keymapping
|
||||||
ace: null,
|
ace: null,
|
||||||
|
|
|
||||||
|
|
@ -1772,7 +1772,7 @@ var Editor = function(renderer, session) {
|
||||||
|
|
||||||
var range = this.session.getBracketRange(cursor);
|
var range = this.session.getBracketRange(cursor);
|
||||||
if (!range) {
|
if (!range) {
|
||||||
range = editor.find({
|
range = this.find({
|
||||||
needle: /[{}()\[\]]/g,
|
needle: /[{}()\[\]]/g,
|
||||||
preventScroll:true,
|
preventScroll:true,
|
||||||
start: {row: cursor.row, column: cursor.column - 1}
|
start: {row: cursor.row, column: cursor.column - 1}
|
||||||
|
|
@ -1787,7 +1787,7 @@ var Editor = function(renderer, session) {
|
||||||
pos = range && range.cursor || pos;
|
pos = range && range.cursor || pos;
|
||||||
if (pos) {
|
if (pos) {
|
||||||
if (select) {
|
if (select) {
|
||||||
if (range && range.isEqual(editor.getSelectionRange()))
|
if (range && range.isEqual(this.getSelectionRange()))
|
||||||
this.clearSelection();
|
this.clearSelection();
|
||||||
else
|
else
|
||||||
this.selection.selectTo(pos.row, pos.column);
|
this.selection.selectTo(pos.row, pos.column);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue