let the document act as anchor factory
This commit is contained in:
parent
3b0e49539b
commit
8e3c1e6096
2 changed files with 7 additions and 3 deletions
|
|
@ -42,15 +42,14 @@ var oop = require("pilot/oop");
|
|||
var lang = require("pilot/lang");
|
||||
var EventEmitter = require("pilot/event_emitter").EventEmitter;
|
||||
var Range = require("ace/range").Range;
|
||||
var Anchor = require("ace/anchor").Anchor;
|
||||
|
||||
var Selection = function(session) {
|
||||
this.session = session;
|
||||
this.doc = session.getDocument();
|
||||
|
||||
this.clearSelection();
|
||||
this.selectionLead = new Anchor(this.doc, 0, 0);
|
||||
this.selectionAnchor = new Anchor(this.doc, 0, 0);
|
||||
this.selectionLead = this.doc.createAnchor(0, 0);
|
||||
this.selectionAnchor = this.doc.createAnchor(0, 0);
|
||||
|
||||
var _self = this;
|
||||
this.selectionLead.on("change", function(e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue