mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-29 09:09:03 +01:00
not rendering when model is too large for tokenization
This commit is contained in:
@@ -370,7 +370,6 @@ export class StickyScrollController extends Disposable implements IEditorContrib
|
||||
|
||||
private _readConfiguration() {
|
||||
const options = this._editor.getOption(EditorOption.stickyScroll);
|
||||
|
||||
if (options.enabled === false) {
|
||||
this._editor.removeOverlayWidget(this._stickyScrollWidget);
|
||||
this._sessionStore.clear();
|
||||
@@ -429,10 +428,10 @@ export class StickyScrollController extends Disposable implements IEditorContrib
|
||||
}
|
||||
|
||||
private _renderStickyScroll() {
|
||||
if (!(this._editor.hasModel())) {
|
||||
const model = this._editor.getModel();
|
||||
if (!model || model.isTooLargeForTokenization()) {
|
||||
return;
|
||||
}
|
||||
const model = this._editor.getModel();
|
||||
const stickyLineVersion = this._stickyLineCandidateProvider.getVersionId();
|
||||
if (stickyLineVersion === undefined || stickyLineVersion === model.getVersionId()) {
|
||||
this._widgetState = this.findScrollWidgetState();
|
||||
|
||||
@@ -44,7 +44,7 @@ export class LargeFileOptimizationsWarner extends Disposable implements IEditorC
|
||||
'Variable 0 will be a file name.'
|
||||
]
|
||||
},
|
||||
"{0}: tokenization, wrapping and folding have been turned off for this large file in order to reduce memory usage and avoid freezing or crashing.",
|
||||
"{0}: tokenization, wrapping, folding and sticky scroll have been turned off for this large file in order to reduce memory usage and avoid freezing or crashing.",
|
||||
path.basename(model.uri.path)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user