提交 f6cf0926 编写于 作者: A Alex Dima

Fixes #36811: updating tha line widths fast can result in a scrollLeft change

上级 af809a59
......@@ -551,17 +551,17 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost<ViewLine>,
}
}
// (3) handle scrolling
this._linesContent.setLayerHinting(this._canUseLayerHinting);
const adjustedScrollTop = this._context.viewLayout.getCurrentScrollTop() - viewportData.bigNumbersDelta;
this._linesContent.setTop(-adjustedScrollTop);
this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft());
// Update max line width (not so important, it is just so the horizontal scrollbar doesn't get too small)
if (!this._updateLineWidthsFast()) {
// Computing the width of some lines would be slow => delay it
this._asyncUpdateLineWidths.schedule();
}
// (3) handle scrolling
this._linesContent.setLayerHinting(this._canUseLayerHinting);
const adjustedScrollTop = this._context.viewLayout.getCurrentScrollTop() - viewportData.bigNumbersDelta;
this._linesContent.setTop(-adjustedScrollTop);
this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft());
}
// --- width
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册