mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-09 05:50:08 +00: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.sessionOptions = this.profile.options
|
||||||
|
|
||||||
this.logger = this.log.create('terminalTab')
|
this.logger = this.log.create('terminalTab')
|
||||||
this.session = new Session(this.injector)
|
|
||||||
|
|
||||||
const isConPTY = isWindowsBuild(WIN_BUILD_CONPTY_SUPPORTED) && this.config.store.terminal.useConPTY
|
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 {
|
initializeSession (columns: number, rows: number): void {
|
||||||
|
|
||||||
|
const session = new Session(this.injector)
|
||||||
|
|
||||||
if (this.profile.options.runAsAdministrator && this.uac?.isAvailable) {
|
if (this.profile.options.runAsAdministrator && this.uac?.isAvailable) {
|
||||||
this.profile = {
|
this.profile = {
|
||||||
...this.profile,
|
...this.profile,
|
||||||
@ -63,13 +65,13 @@ export class TerminalTabComponent extends BaseTerminalTabComponent<LocalProfile>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.session!.start({
|
session.start({
|
||||||
...this.profile.options,
|
...this.profile.options,
|
||||||
width: columns,
|
width: columns,
|
||||||
height: rows,
|
height: rows,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.attachSessionHandlers(true)
|
this.setSession(session, true)
|
||||||
this.recoveryStateChangedHint.next()
|
this.recoveryStateChangedHint.next()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user