-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
How to determine if a Terminal created using new API has been closed by the user? #10925
Comments
@jrieken what's the common/recommended way of communicating this sort of event via the API? |
We do this with the global events ala @Tyriar One question regarding |
@jrieken I should flesh this out in the jsdoc if it wasn't clear, but hide will close the panel if that terminal is currently active, dispose kills the terminal but keeps the panel up. |
@Tyriar I am a little confused because of that. I assume that is the same as calling |
The |
@Tyriar , will the proposed |
@DonJayamanne looking at this for 1.6 |
@Tyriar , thanks |
@Tyriar Awesome, nice work! |
This will land in tomorrow's insiders. Note that currently the event will only fire for terminals created with the API. This can be easily be changed in a backwards compatible way to include all terminals if an It should fire when terminals are closed both through the API and through user interaction (command, button). |
@Tyriar What is the definition of close? kill/dispose or not visible anymore? |
@jrieken kill/dispose, I'd prefer to name this |
👎 We already have this and it is also about disposing /**
* An event that is emitted when a [text document](#TextDocument) is disposed.
*/
export const onDidCloseTextDocument: Event<TextDocument>; |
So just improve the jsdoc that it's about disposing, not hiding? |
Also |
Changed close to dispose in the jsdoc, reopen if there's anything else you think should change. |
lgtm |
I'm using the code sample put together by @Tyriar
Steps to Reproduce:
(NOTE: Terminal has now been disposed, but extension is not aware of this)
A new terminal window is opened.
Is it possible for the extension to be notified of the fact that the terminal has been closed?
Either via:
The text was updated successfully, but these errors were encountered: