mirror of
https://github.com/Eugeny/tabby.git
synced 2025-04-12 16:10:26 +08:00
ref(tabby-local): use setSession method in terminalTab component
This commit is contained in:
parent
6498c4f923
commit
f2a62413da
@ -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()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user