-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terminal API: debounce onData()? #48513
Comments
I was actually introducing this at a lower level than this, but it would probably not be enabled for standard vscode terminals microsoft/node-pty#189, it may actually slow things down unless things are going over the wire. Some debouncing would be a good idea between the renderer and extension host. |
Fixes #48513 - buffers terminal onData events
Is this user-facing? How can I verify? |
@eamodio can you put some steps in please? |
To test this you need to create an extension:
export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(
(vscode.window as any).onDidWriteTerminalData(
(e: { readonly terminal: vscode.Terminal; readonly data: string }) => {
console.log(`${e.terminal.name}\n${e.data}`);
}
)
);
}
|
Refs: #48434
It looks like every single character I type produces a onData event in the terminal. Should this maybe be debounced? What is the scenario for having this API that it needs to fire on each keystroke?
The text was updated successfully, but these errors were encountered: