fix scroll cursor into view if the editor is not visible

This commit is contained in:
Fabian Jakobs 2011-02-17 11:05:11 +01:00
commit e99e4cc632

View file

@ -582,6 +582,10 @@ var VirtualRenderer = function(container, theme) {
};
this.scrollCursorIntoView = function() {
// the editor is not visible
if (this.$size.scrollerHeight === 0)
return;
var pos = this.$cursorLayer.getPixelPosition();
var left = pos.left + this.$padding;