Skip to content
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

Wait to signal to the extHostTerminalService that the terminal is opened until the terminal has a name. #58983

Merged
merged 4 commits into from
Sep 21, 2018

Conversation

alexr00
Copy link
Member

@alexr00 alexr00 commented Sep 19, 2018

Also added a change listener for title. Fixes #53057

@alexr00
Copy link
Member Author

alexr00 commented Sep 20, 2018

Tested with

const shell = vscode.window.createTerminalRenderer('fake shell');
shell.write('Type and press enter to echo the text\r\n\r\n');
shell.terminal.show();
setTimeout(() => {
    shell.name = 'new name';
    setTimeout(() => console.log(shell.terminal.name), 500);
}, 500);

and by checking the terminal name in onDidOpenTerminal

@@ -155,6 +156,24 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
terminalInstance.addDisposable(this._terminalOnDidWriteDataListeners[terminalId]);
}

public $registerOnTitleChangedListener(terminalId: number): void {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, I think we can just remove this and always send titles over from the main side.

@Tyriar Tyriar added this to the September 2018 milestone Sep 21, 2018
@alexr00 alexr00 merged commit 1ff175f into master Sep 21, 2018
@alexr00 alexr00 deleted the alexr00/terminalTitle2 branch September 21, 2018 21:10
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terminal.name and TerminalRenderer.name can get out of sync
2 participants