We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 180e752 commit 2f37f66Copy full SHA for 2f37f66
lib/codemirror.js
@@ -2829,8 +2829,11 @@ window.CodeMirror = (function() {
2829
2830
refresh: function() {
2831
clearCaches(this);
2832
- if (this.display.scroller.scrollHeight > this.view.scrollTop)
2833
- this.display.scrollbarV.scrollTop = this.display.scroller.scrollTop = this.view.scrollTop;
+ var sTop = this.view.scrollTop, sLeft = this.view.scrollLeft;
+ if (this.display.scroller.scrollHeight > sTop)
2834
+ this.display.scrollbarV.scrollTop = this.display.scroller.scrollTop = sTop;
2835
+ if (this.display.scroller.scrollWidth > sLeft)
2836
+ this.display.scrollbarH.scrollLeft = this.display.scroller.scrollLeft = sLeft;
2837
updateDisplay(this, true);
2838
},
2839
0 commit comments