Skip to content

vscode.window.activeTextEditor is undefined for files larger then 5MB #32118

Closed
@GreenRover

Description

I wrote an Visual Studio Code extension. Based on this example: https://github.com/Microsoft/vscode-extension-samples/tree/master/previewhtml-sample

    var editor = vscode.window.activeTextEditor;
    if (!editor) {
        console.log("No open text editor");
    }

This works fine if i open a 2MB File. But not if the file is 5MB or larger.

But if i copy (CTRL+C,CTRL+V) a 10MB into a new editor it will work and is prety fast. Has anyone an idea what kind of limitation this is?

Metadata

Assignees

Labels

apiunder-discussionIssue is under discussion for relevance, priority, approach

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions