mirror of
https://github.com/Eugeny/tabby.git
synced 2025-04-12 16:10:26 +08:00
fixed automatic resizing with xterm
This commit is contained in:
parent
6a5dc79c5d
commit
a64bbe145c
@ -14,7 +14,7 @@ export class XTermFrontend extends Frontend {
|
||||
xterm: Terminal
|
||||
private configuredFontSize = 0
|
||||
private zoom = 0
|
||||
private resizeHandler: any
|
||||
private resizeHandler: () => void
|
||||
private configuredTheme: ITheme = {}
|
||||
private copyOnSelect = false
|
||||
|
||||
@ -96,6 +96,15 @@ export class XTermFrontend extends Frontend {
|
||||
}
|
||||
|
||||
configure (config: any): void {
|
||||
if (this.resizeHandler) {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
this.resizeHandler()
|
||||
} catch (e) {
|
||||
// fit() might throw if xterm isn't fully attached yet
|
||||
}
|
||||
})
|
||||
}
|
||||
this.xterm.setOption('fontFamily', `"${config.terminal.font}", "monospace-fallback", monospace`)
|
||||
this.xterm.setOption('bellStyle', config.terminal.bell)
|
||||
this.xterm.setOption('cursorStyle', {
|
||||
|
Loading…
x
Reference in New Issue
Block a user