create selection after the document

This commit is contained in:
Fabian Jakobs 2011-02-11 08:10:15 +01:00
commit f9d3155f08

View file

@ -49,7 +49,6 @@ var NO_CHANGE_DELTAS = {};
var EditSession = function(text, mode) {
this.$modified = true;
this.selection = new Selection(this);
this.$breakpoints = [];
this.$wrapData = [];
this.listeners = [];
@ -60,6 +59,7 @@ var EditSession = function(text, mode) {
this.setDocument(new Document(text));
}
this.selection = new Selection(this);
if (mode)
this.setMode(mode);
};