Support large documents in extension host
See original GitHub issue- VSCode Version: 1.14.1
- OS Version: Windows 7 and Windows 10, likely all OSes
When editing documents with very long lines, such as lines containing data-URIs, the property vscode.window.activeTextEditor
will be undefined
when it should be defined.
Steps to reproduce:
- Create a new (blank) VSCode extension, and add this command to
extension.ts
:
'use strict';
import * as vscode from 'vscode';
export function activate(context: vscode.ExtensionContext) {
let disposable = vscode.commands.registerCommand('bigDocTest.runDocTest', () => {
let hasActiveTextEditor = (vscode.window.activeTextEditor !== undefined);
if (hasActiveTextEditor) {
vscode.window.showInformationMessage('Success, activeTextEditor is defined.');
} else {
vscode.window.showErrorMessage('Oops, activeTextEditor is not defined.');
}
});
context.subscriptions.push(disposable);
}
export function deactivate() {
}
-
Launch this extension, load any normal text file, and run this command, you see the “Success, activeTextEditor is defined” information message appear.
-
But, try loading a file with a very long line contained inside it, such as this one: MetalRoughSpheres.gltf. This file has long lines due to the use of embedded data URIs in the file. If you run the above sample extension while editing this file, you see “Oops, activeTextEditor is not defined.”
This makes it difficult for VSCode extensions to work with such files. I’m the lead dev of the GLTF extension for VSCode, and this prevents my extension from running on GLTF files that embed large images as data URIs.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:121
- Comments:12 (3 by maintainers)
Top GitHub Comments
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
It would be great for the user to be able to configure it at least. I work with log files of max 200MB using Visual Studio Code and since there is no native filtering using line or regex (include/exclude), I can’t filter the log file through third-party extension either…