keep vertical scroll position if gutter size changes during setSession
This commit is contained in:
parent
9f1d8af937
commit
5dee6a10c3
1 changed files with 3 additions and 2 deletions
|
|
@ -427,18 +427,20 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
// full
|
||||
if (changes & this.CHANGE_FULL) {
|
||||
// update scrollbar first to not loose scroll position when gutter calls resize
|
||||
this.$updateScrollBar();
|
||||
this.$textLayer.update(this.layerConfig);
|
||||
if (this.showGutter)
|
||||
this.$gutterLayer.update(this.layerConfig);
|
||||
this.$markerBack.update(this.layerConfig);
|
||||
this.$markerFront.update(this.layerConfig);
|
||||
this.$cursorLayer.update(this.layerConfig);
|
||||
this.$updateScrollBar();
|
||||
return;
|
||||
}
|
||||
|
||||
// scrolling
|
||||
if (changes & this.CHANGE_SCROLL) {
|
||||
this.$updateScrollBar();
|
||||
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
|
||||
this.$textLayer.update(this.layerConfig);
|
||||
else
|
||||
|
|
@ -449,7 +451,6 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$markerBack.update(this.layerConfig);
|
||||
this.$markerFront.update(this.layerConfig);
|
||||
this.$cursorLayer.update(this.layerConfig);
|
||||
this.$updateScrollBar();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue