1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-09-11 13:13:59 +03:00

ref(tabby-local): use setSession method in terminalTab component

This commit is contained in:
Clem 2023-04-22 15:51:29 +02:00
parent 6498c4f923
commit f2a62413da

View File

@ -28,7 +28,6 @@ export class TerminalTabComponent extends BaseTerminalTabComponent<LocalProfile>
this.sessionOptions = this.profile.options
this.logger = this.log.create('terminalTab')
this.session = new Session(this.injector)
const isConPTY = isWindowsBuild(WIN_BUILD_CONPTY_SUPPORTED) && this.config.store.terminal.useConPTY
@ -56,6 +55,9 @@ export class TerminalTabComponent extends BaseTerminalTabComponent<LocalProfile>
}
initializeSession (columns: number, rows: number): void {
const session = new Session(this.injector)
if (this.profile.options.runAsAdministrator && this.uac?.isAvailable) {
this.profile = {
...this.profile,
@ -63,13 +65,13 @@ export class TerminalTabComponent extends BaseTerminalTabComponent<LocalProfile>
}
}
this.session!.start({
session.start({
...this.profile.options,
width: columns,
height: rows,
})
this.attachSessionHandlers(true)
this.setSession(session, true)
this.recoveryStateChangedHint.next()
}