more scrolling fixes
This commit is contained in:
parent
aed7ca654c
commit
24eccde63e
2 changed files with 14 additions and 11 deletions
|
|
@ -611,7 +611,7 @@ var Editor = function(renderer, session) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getAnimatedScroll = function(){
|
this.getAnimatedScroll = function(){
|
||||||
this.renderer.getAnimatedScroll();
|
return this.renderer.getAnimatedScroll();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setShowInvisibles = function(showInvisibles) {
|
this.setShowInvisibles = function(showInvisibles) {
|
||||||
|
|
@ -1243,15 +1243,18 @@ var Editor = function(renderer, session) {
|
||||||
this.selection.setSelectionRange(range);
|
this.selection.setSelectionRange(range);
|
||||||
this.$blockScrolling -= 1;
|
this.$blockScrolling -= 1;
|
||||||
|
|
||||||
var cursor = this.getCursorPosition();
|
if (this.getAnimatedScroll()) {
|
||||||
if (!this.isRowFullyVisible(cursor.row))
|
var cursor = this.getCursorPosition();
|
||||||
this.scrollToLine(cursor.row, true);
|
if (!this.isRowFullyVisible(cursor.row))
|
||||||
|
this.scrollToLine(cursor.row, true);
|
||||||
//@todo scroll X
|
|
||||||
//if (!this.isRowFullyVisible(cursor.row))
|
//@todo scroll X
|
||||||
//this.scrollToLine(cursor.row, true);
|
//if (!this.isColumnFullyVisible(cursor.column))
|
||||||
|
//this.scrollToRow(cursor.column);
|
||||||
this.renderer.scrollSelectionIntoView(range.start, range.end);
|
}
|
||||||
|
else {
|
||||||
|
this.renderer.scrollSelectionIntoView(range.start, range.end);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$animatedScroll = shouldAnimate;
|
this.$animatedScroll = shouldAnimate;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getAnimatedScroll = function(){
|
this.getAnimatedScroll = function() {
|
||||||
return this.$animatedScroll;
|
return this.$animatedScroll;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue