-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Window layout persisted in state.json
even if window persistence not enabled
#17207
Comments
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
I figured they were related, but not quite the same, so opened a separate ticket - given that this pre-dates 1.21. |
Oof, I saw the title, read the repro steps, and considering the timing I thought it would be a dupe. I'm sorry. 😣 However, it is in fact the exact same underlying reason: 1.20 contains the same session persistence improvements that 1.21 got, but without the buffer restore code. This is why both 1.20 and 1.21 have the same bug: They persist, even when they shouldn't. I'll mark #17211 as fixing this issue. We'll then backport the parts that are relevant for 1.20 (a single if condition basically). |
This fixes 2 bugs: * `PersistState` being called when the window is closed (as opposed to closing the tab). The settings check was missing. * Session cleanup running depending on whether the feature is currently enabled as opposed to whether it was enabled on launch. Closes #17206 Closes #17207 ## Validation Steps Performed * Create a bunch of leftover buffer_*.txt files by running the current Dev version off of main * Build this branch, then open and close a window * All buffer_*.txt are gone and state.json is cleaned up ✅
This fixes 2 bugs: * `PersistState` being called when the window is closed (as opposed to closing the tab). The settings check was missing. * Session cleanup running depending on whether the feature is currently enabled as opposed to whether it was enabled on launch. Closes #17206 Closes #17207 ## Validation Steps Performed * Create a bunch of leftover buffer_*.txt files by running the current Dev version off of main * Build this branch, then open and close a window * All buffer_*.txt are gone and state.json is cleaned up ✅ (cherry picked from commit dbac3a1) Service-Card-Id: 92515454 Service-Version: 1.21
Windows Terminal version
1.20.11215.0
Windows build number
10.0.22631.3447
Other Software
No response
Steps to reproduce
cmd /k echo hello world
%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState\state.json
Expected Behavior
There is no history of the command that I ran in
state.json
.Actual Behavior
state.json
has leaked my super secret command line invocation!This is not reproducible on version 1.19.11213.0.
The text was updated successfully, but these errors were encountered: