refactor selection support into a separate class
Merge branch 'master' into HEAD Conflicts: src/Editor.js src/KeyBinding.js src/Selection.js
This commit is contained in:
parent
b7e69d5da5
commit
7529f90080
12 changed files with 887 additions and 680 deletions
|
|
@ -3,6 +3,7 @@ ace.provide("ace.TextDocument");
|
|||
ace.TextDocument = function(text) {
|
||||
this.lines = this._split(text);
|
||||
this.modified = true;
|
||||
this.selection = new ace.Selection(this);
|
||||
|
||||
this.listeners = [];
|
||||
};
|
||||
|
|
@ -15,6 +16,10 @@ ace.TextDocument.prototype.toString = function() {
|
|||
return this.lines.join("\n");
|
||||
};
|
||||
|
||||
ace.TextDocument.prototype.getSelection = function() {
|
||||
return this.selection;
|
||||
};
|
||||
|
||||
ace.TextDocument.prototype.addChangeListener = function(listener) {
|
||||
this.listeners.push(listener);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue