cursors should start in hidden state

This commit is contained in:
nightwing 2012-10-26 20:55:36 +04:00
commit 4ab41d02cc

View file

@ -45,6 +45,7 @@ var Cursor = function(parentEl) {
this.cursors = [];
this.cursor = this.addCursor();
dom.addCssClass(this.element, "ace_hidden-cursors");
};
(function() {
@ -146,12 +147,8 @@ var Cursor = function(parentEl) {
};
this.getPixelPosition = function(position, onScreen) {
if (!this.config || !this.session) {
return {
left : 0,
top : 0
};
}
if (!this.config || !this.session)
return {left : 0, top : 0};
if (!position)
position = this.session.selection.getCursor();
@ -161,10 +158,7 @@ var Cursor = function(parentEl) {
var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *
this.config.lineHeight;
return {
left : cursorLeft,
top : cursorTop
};
return {left : cursorLeft, top : cursorTop};
};
this.update = function(config) {