[PR #17211] Fix session being persisted even when disabled #31154

Open
opened 2026-01-31 09:45:27 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/17211

State: closed
Merged: Yes


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
**Original Pull Request:** https://github.com/microsoft/terminal/pull/17211 **State:** closed **Merged:** Yes --- 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 ✅
claunia added the pull-request label 2026-01-31 09:45:27 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31154