Skip to content

Commit c1e5eca

Browse files
committed
fixing validation on maxMemory setting
fixes microsoft#46767
1 parent 5bf4195 commit c1e5eca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/vs/workbench/parts/files/browser/editors/textFileEditor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export class TextFileEditor extends BaseTextEditor {
171171
}
172172

173173
if ((<FileOperationError>error).fileOperationResult === FileOperationResult.FILE_EXCEED_MEMORY_LIMIT) {
174-
let memoryLimit = this.configurationService.getValue<number>(null, 'files.maxMemoryForLargeFilesMB') | 4096;
174+
let memoryLimit = Math.max(2048, +this.configurationService.getValue<number>(null, 'files.maxMemoryForLargeFilesMB') || 4096);
175175

176176
return TPromise.wrapError<void>(errors.create(toErrorMessage(error), {
177177
actions: [

0 commit comments

Comments
 (0)