Skip to content

Pseudoterminal output does not appear f emitted before open() event fires #108298

Description

@DanTup

Not sure what's happening here, but content written to an emitter for a pseudo terminal doesn't seem to show up outside of the open function:

const emitter = new vs.EventEmitter<string>();
const pseudoterminal: vs.Pseudoterminal = {
	close: () => { },
	onDidWrite: emitter.event,
	open: () => { emitter.fire("Hello world!\r\n"); },
};
const terminal = vs.window.createTerminal({ name: `Danny Test Terminal`, pty: pseudoterminal });
emitter.fire(`Test 1\r\n`);
terminal.show();
emitter.fire(`Test 2\r\n`);
setTimeout(() => emitter.fire(`Test 3\r\n`), 100);

I only see the first line in the terminal:

Screenshot 2020-10-08 at 12 18 05

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apibugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersterminalGeneral terminal issues that don't fall under another labelverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions