terminal: Update terminal reopening from global to per-workspace (#25336)

Closes #7145

Currently, terminal persistence is global, i.e. split configurations are
restored across all workspaces.

This PR changes it to per-workspace, so configurations are restored only
within the same workspace. Opening a new window will start with a fresh
terminal.


https://github.com/user-attachments/assets/d43fe747-9f28-4723-b409-e8dbb3a23912


Release Notes:

- Improved terminal reopening to be per workspace instead of global.
This commit is contained in:
smit 2025-02-22 00:05:52 +05:30 committed by GitHub
parent 144d8a1db6
commit 3759e0bf55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 72 additions and 24 deletions

View file

@ -4385,6 +4385,10 @@ impl Workspace {
self.database_id
}
pub fn session_id(&self) -> Option<String> {
self.session_id.clone()
}
fn local_paths(&self, cx: &App) -> Option<Vec<Arc<Path>>> {
let project = self.project().read(cx);