-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Description
Windows Terminal version
Windows Terminal Preview Version: 1.21.1272.0
Windows build number
10.0.19045.0
Other Software
No response
Summary
I installed Windows Terminal Preview to make use of the new buffer restoration feature, noted as the first bullet here: https://github.com/microsoft/terminal/releases/tag/v1.21.1272.0 (i.e. #16598), but it doesn't seem to behave any differently than previous versions, out of the box. Not sure if the feature is broken, or I'm doing something wrong, or what.
While searching related issues, I saw #17179, but it seems to be related more to special cases while restoring after a reboot due to Windows updates. In my case, I can't get the functionality to work even under the simplest condition of manually closing and reopening Terminal.
Steps to reproduce
- Install Windows Terminal Preview Version: 1.21.1272.0 from the MS app store.
- Launch Terminal Preview.
- Ensure that
Settings -> Startup -> When Terminal startsis set toOpen windows from a previous session. - Run some commands in a tab. In my case I'm just testing with a PowerShell 7 tab with no profile customizations and running
Get-Process. - Close Terminal Preview.
- Launch Preview.
Expected Behavior
Original tabs, titles, and contents are restored. In the example case, the single PowerShell 7 tab should have the output of the previously-run Get-Process command displayed in the buffer content, along with however much further buffer history is expected by this feature.
Actual Behavior
Original tabs and tab titles are restored (as in previous versions), but buffer contents are empty (as in previous versions).
Additional info
According to the release notes linked above:
Buffer snapshots are stored in human-readable (albeit UTF-16) VT-encoded text in your package's local state directory, next to your settings.
I do see a file named buffer_<guid>.txt alongside my settings.json and state.json files in the Terminal Preview installation's LocalState folder (where such a file doesn't exist in the production Terminal app's LocalState folder). And that file does contain the output of Get-Process, as expected. But It's apparently just not being pulled into Terminal on a restart. I even see a couple lines in the buffer file that look like [Restored <DateTime>].