Skip to content

Commit 5ad8fec

Browse files

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src-noconflict/ace.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -15764,13 +15764,16 @@ var VirtualRenderer = function(container, theme) {
1576415764
) + this.scrollMargin.v + (this.$extraHeight || 0);
1576515765
if (this.$horizScroll)
1576615766
desiredHeight += this.scrollBarH.getHeight();
15767+
/*TODO: Fix the logic */
1576715768
var vScroll = height > maxHeight;
15769+
var changed = false;
1576815770

1576915771
if (desiredHeight != this.desiredHeight ||
1577015772
this.$size.height != this.desiredHeight || vScroll != this.$vScroll) {
1577115773
if (vScroll != this.$vScroll) {
15772-
this.$vScroll = vScroll;
15773-
this.scrollBarV.setVisible(vScroll);
15774+
// this.$vScroll = vScroll;
15775+
// this.scrollBarV.setVisible(vScroll);
15776+
changed = true;
1577415777
}
1577515778

1577615779
var w = this.container.clientWidth;
@@ -15780,6 +15783,7 @@ var VirtualRenderer = function(container, theme) {
1578015783

1578115784
this._signal("autosize");
1578215785
}
15786+
return changed;
1578315787
};
1578415788

1578515789
this.$computeLayerConfig = function() {
@@ -15801,8 +15805,9 @@ var VirtualRenderer = function(container, theme) {
1580115805
this.scrollBarH.setVisible(horizScroll);
1580215806
}
1580315807
var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine
15808+
var autosize_changed = false;
1580415809
if (this.$maxLines && this.lineHeight > 1)
15805-
this.$autosize();
15810+
autosize_changed = this.$autosize();
1580615811

1580715812
var offset = this.scrollTop % this.lineHeight;
1580815813
var minHeight = size.scrollerHeight + this.lineHeight;
@@ -15821,8 +15826,9 @@ var VirtualRenderer = function(container, theme) {
1582115826

1582215827
var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||
1582315828
size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top);
15829+
/*TODO: Fix the logic */
1582415830
var vScrollChanged = vScrollBefore !== vScroll;
15825-
if (vScrollChanged) {
15831+
if (vScrollChanged || autosize_changed) {
1582615832
this.$vScroll = vScroll;
1582715833
this.scrollBarV.setVisible(vScroll);
1582815834
}

0 commit comments

Comments
 (0)