feat: restore tabs and splits at launch
The tab layout (tab order and names, pins, the active tab, split trees with their ratios) is saved whenever it changes — checked once a second, written only on change, so it survives a crash — and reopened at the next launch: saved profiles reconnect and local shells start in the directory they were in (on Linux the live /proc cwd, so it isn't one command behind). Quick Connect tabs and placeholder panes are skipped. A General setting turns it off; it never runs when launched with --connect, --run-local or --open, and screenshot runs never save. Verified: a local tab left in /usr/share came back there with a 'Restored 1 tab(s)' toast.
This commit is contained in:
@@ -127,6 +127,11 @@ impl Service {
|
||||
self.sessions.connect_local(&shell)
|
||||
}
|
||||
|
||||
/// A local shell with an explicit shell and start directory (restored tabs).
|
||||
pub fn connect_local_in(&self, shell: &str, cwd: Option<PathBuf>) -> String {
|
||||
self.sessions.connect_local_in(shell, cwd)
|
||||
}
|
||||
|
||||
pub fn reconnect(&self, id: &str) -> Result<String> {
|
||||
self.sessions.reconnect(id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user