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

Option onExit in terminal.integrated.persistentSessionReviveProcess also restores terminal buffer when window is closed and then reopened #134062

Closed
karrtikr opened this issue Sep 28, 2021 · 11 comments
Assignees
Labels
info-needed Issue requires more information from poster terminal General terminal issues that don't fall under another label

Comments

@karrtikr
Copy link
Contributor

Testing #133516

There're two options: onExitAndWindowClose and onExit, both seem to be working the some way. I'm assuming if I close the Window using Close Window command, onExit should not apply and only onExitAndWindowClose should.

@meganrogge
Copy link
Contributor

is it the last window that you are closing? if so, according to the description, it should restore.

@karrtikr
Copy link
Contributor Author

karrtikr commented Sep 28, 2021

I'm using Close window command, which apparently closes every tab and exits VSCode. What is meant by a "window" here and how to close it?

@meganrogge
Copy link
Contributor

meganrogge commented Sep 28, 2021

meaning if you have several vscode windows open then closing and reopening that window with onExit set, shouldn't restore (according to the setting description).

but if you have only one vscode window open and you close and re-open it, then it should restore the terminals

@karrtikr
Copy link
Contributor Author

Ah I see, thanks. Can you tell how do I reopen a window which I just closed?

@meganrogge
Copy link
Contributor

I think VS code will automatically open the last window you had open when you next open the app

@karrtikr
Copy link
Contributor Author

when you next open the app

That's true, but I only have to close one window (which is not the last window) and so the app will still be open. I guess what I'm asking is how do I restore a single window while other windows and the app are still open?

@meganrogge
Copy link
Contributor

onExit should only restore when 1) all of the windows are closed 2) the last window is closed (not on mac) and reopened
onExitAndWindowClose should restore when any window is closed and reopened

@meganrogge meganrogge added the info-needed Issue requires more information from poster label Oct 4, 2021
@karrtikr
Copy link
Contributor Author

karrtikr commented Oct 4, 2021

onExitAndWindowClose should restore when any window is closed and reopened

I'm not sure how to test this behavior as I'm not clear on how to accomplish the "reopen" part here for any window.

@meganrogge
Copy link
Contributor

@karrtikr let's say you have 3 folders open in separate windows: A, B, C and have onExitAndWindowClose set.

close the window with folder C. in window A or B, go to file -> open recent -> open folder C. the terminal buffers should be restored.

@Tyriar correct this if it's inaccurate please

@meganrogge meganrogge added the terminal General terminal issues that don't fall under another label label Oct 6, 2021
@meganrogge
Copy link
Contributor

closing this because it's been 7 days since a follow up. if you want to follow up on this, feel free to reopen @karrtikr

@karrtikr
Copy link
Contributor Author

Apologies for the delay, I can confirm it works fine👍

@github-actions github-actions bot locked and limited conversation to collaborators Nov 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster terminal General terminal issues that don't fall under another label
Projects
None yet
Development

No branches or pull requests

3 participants