mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-28 13:56:50 +01:00
@@ -294,8 +294,8 @@ export function fillEditorsDragData(accessor: ServicesAccessor, resourcesOrEdito
|
||||
editor.encoding = textFileModel.getEncoding();
|
||||
}
|
||||
|
||||
// contents (only if dirty)
|
||||
if (typeof editor.contents !== 'string' && textFileModel.isDirty()) {
|
||||
// contents (only if dirty and not too large)
|
||||
if (typeof editor.contents !== 'string' && textFileModel.isDirty() && !textFileModel.textEditorModel.isTooLargeForHeapOperation()) {
|
||||
editor.contents = textFileModel.textEditorModel.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,8 +433,8 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements
|
||||
untypedInput.languageId = this.getLanguageId();
|
||||
untypedInput.contents = (() => {
|
||||
const model = this.textFileService.files.get(this.resource);
|
||||
if (model?.isDirty()) {
|
||||
return model.textEditorModel.getValue(); // only if dirty
|
||||
if (model?.isDirty() && !model.textEditorModel.isTooLargeForHeapOperation()) {
|
||||
return model.textEditorModel.getValue(); // only if dirty and not too large
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user