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
|
// full
|
||||||
if (changes & this.CHANGE_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);
|
this.$textLayer.update(this.layerConfig);
|
||||||
if (this.showGutter)
|
if (this.showGutter)
|
||||||
this.$gutterLayer.update(this.layerConfig);
|
this.$gutterLayer.update(this.layerConfig);
|
||||||
this.$markerBack.update(this.layerConfig);
|
this.$markerBack.update(this.layerConfig);
|
||||||
this.$markerFront.update(this.layerConfig);
|
this.$markerFront.update(this.layerConfig);
|
||||||
this.$cursorLayer.update(this.layerConfig);
|
this.$cursorLayer.update(this.layerConfig);
|
||||||
this.$updateScrollBar();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// scrolling
|
// scrolling
|
||||||
if (changes & this.CHANGE_SCROLL) {
|
if (changes & this.CHANGE_SCROLL) {
|
||||||
|
this.$updateScrollBar();
|
||||||
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
|
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
|
||||||
this.$textLayer.update(this.layerConfig);
|
this.$textLayer.update(this.layerConfig);
|
||||||
else
|
else
|
||||||
|
|
@ -449,7 +451,6 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$markerBack.update(this.layerConfig);
|
this.$markerBack.update(this.layerConfig);
|
||||||
this.$markerFront.update(this.layerConfig);
|
this.$markerFront.update(this.layerConfig);
|
||||||
this.$cursorLayer.update(this.layerConfig);
|
this.$cursorLayer.update(this.layerConfig);
|
||||||
this.$updateScrollBar();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue