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

Buffer restore is created even if "persistedWindowLayout" is not set #17206

Closed
jiangzhenjerry opened this issue May 8, 2024 · 0 comments · Fixed by #17211
Closed

Buffer restore is created even if "persistedWindowLayout" is not set #17206

jiangzhenjerry opened this issue May 8, 2024 · 0 comments · Fixed by #17211
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-1 A description (P1) Product-Terminal The new Windows Terminal.

Comments

@jiangzhenjerry
Copy link

Windows Terminal version

1.21.1272.0

Windows build number

10.0.26200.5001

Other Software

No response

Steps to reproduce

  1. Delete everything in LocalState folder, just so that Terminal is vanilla with factory defaults.
  2. Open Terminal, and then close it.
  3. Repeat Step 2 several times.
  4. Check your LocalState folder.

Expected Behavior

By default, firstWindowPreference is set to "defaultProfile", therefore no buffer file should be created.

Actual Behavior

  1. A buffer restore file (buffer_xxxx.txt) is still created.
  2. What's worse, this file won't be deleted automatically. Every time Terminal starts, an additional buffer file is created. Very soon the LocalState folder will be filled with tons of such files.
sshot-1
@jiangzhenjerry jiangzhenjerry added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 8, 2024
@lhecker lhecker added Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal. Priority-1 A description (P1) labels May 8, 2024
github-merge-queue bot pushed a commit that referenced this issue May 8, 2024
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 ✅
DHowett pushed a commit that referenced this issue May 13, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-1 A description (P1) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants