mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
don't include tab state in saved layouts
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Component, Input, Injector } from '@angular/core'
|
||||
import { BaseTabProcess, WIN_BUILD_CONPTY_SUPPORTED, isWindowsBuild } from 'tabby-core'
|
||||
import { BaseTabProcess, WIN_BUILD_CONPTY_SUPPORTED, isWindowsBuild, GetRecoveryTokenOptions } from 'tabby-core'
|
||||
import { BaseTerminalTabComponent } from 'tabby-terminal'
|
||||
import { LocalProfile, SessionOptions } from '../api'
|
||||
import { Session } from '../session'
|
||||
@@ -74,7 +74,7 @@ export class TerminalTabComponent extends BaseTerminalTabComponent {
|
||||
this.recoveryStateChangedHint.next()
|
||||
}
|
||||
|
||||
async getRecoveryToken (): Promise<any> {
|
||||
async getRecoveryToken (options?: GetRecoveryTokenOptions): Promise<any> {
|
||||
const cwd = this.session ? await this.session.getWorkingDirectory() : null
|
||||
return {
|
||||
type: 'app:local-tab',
|
||||
@@ -83,10 +83,10 @@ export class TerminalTabComponent extends BaseTerminalTabComponent {
|
||||
options: {
|
||||
...this.profile.options,
|
||||
cwd: cwd ?? this.profile.options.cwd,
|
||||
restoreFromPTYID: this.session?.getPTYID(),
|
||||
restoreFromPTYID: options?.includeState && this.session?.getPTYID(),
|
||||
},
|
||||
},
|
||||
savedState: this.frontend?.saveState(),
|
||||
savedState: options?.includeState && this.frontend?.saveState(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -19,18 +19,4 @@ export class RecoveryProvider extends TabRecoveryProvider<TerminalTabComponent>
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
duplicate (recoveryToken: RecoveryToken): RecoveryToken {
|
||||
return {
|
||||
...recoveryToken,
|
||||
profile: {
|
||||
...recoveryToken.profile,
|
||||
options: {
|
||||
...recoveryToken.profile.options,
|
||||
restoreFromPTYID: null,
|
||||
},
|
||||
},
|
||||
savedState: null,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user