mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Monkey patch ace until cursor patches come from upstream
This commit is contained in:
@@ -11428,6 +11428,7 @@ var Editor = function(renderer, session) {
|
|||||||
|
|
||||||
this._signal("change", e);
|
this._signal("change", e);
|
||||||
this.$cursorChange();
|
this.$cursorChange();
|
||||||
|
this.$updateHighlightActiveLine();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.onTokenizerUpdate = function(e) {
|
this.onTokenizerUpdate = function(e) {
|
||||||
@@ -14853,8 +14854,10 @@ var VirtualRenderer = function(container, theme) {
|
|||||||
this.$changedLines.lastRow = lastRow;
|
this.$changedLines.lastRow = lastRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.$changedLines.firstRow > this.layerConfig.lastRow ||
|
if (this.$changedLines.lastRow < this.layerConfig.firstRow)
|
||||||
this.$changedLines.lastRow < this.layerConfig.firstRow)
|
this.$changedLines.lastRow = this.layerConfig.lastRow
|
||||||
|
|
||||||
|
if (this.$changedLines.firstRow > this.layerConfig.lastRow)
|
||||||
return;
|
return;
|
||||||
this.$loop.schedule(this.CHANGE_LINES);
|
this.$loop.schedule(this.CHANGE_LINES);
|
||||||
};
|
};
|
||||||
@@ -15218,6 +15221,11 @@ var VirtualRenderer = function(container, theme) {
|
|||||||
changes & this.CHANGE_H_SCROLL
|
changes & this.CHANGE_H_SCROLL
|
||||||
) {
|
) {
|
||||||
changes |= this.$computeLayerConfig();
|
changes |= this.$computeLayerConfig();
|
||||||
|
if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) {
|
||||||
|
this.scrollTop = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight;
|
||||||
|
changes = changes | this.CHANGE_SCROLL;
|
||||||
|
changes |= this.$computeLayerConfig();
|
||||||
|
}
|
||||||
config = this.layerConfig;
|
config = this.layerConfig;
|
||||||
this.$updateScrollBarV();
|
this.$updateScrollBarV();
|
||||||
if (changes & this.CHANGE_H_SCROLL)
|
if (changes & this.CHANGE_H_SCROLL)
|
||||||
|
|||||||
Reference in New Issue
Block a user