mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-13 07:59:59 +00: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
|
xterm: Terminal
|
||||||
private configuredFontSize = 0
|
private configuredFontSize = 0
|
||||||
private zoom = 0
|
private zoom = 0
|
||||||
private resizeHandler: any
|
private resizeHandler: () => void
|
||||||
private configuredTheme: ITheme = {}
|
private configuredTheme: ITheme = {}
|
||||||
private copyOnSelect = false
|
private copyOnSelect = false
|
||||||
|
|
||||||
@ -96,6 +96,15 @@ export class XTermFrontend extends Frontend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure (config: any): void {
|
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('fontFamily', `"${config.terminal.font}", "monospace-fallback", monospace`)
|
||||||
this.xterm.setOption('bellStyle', config.terminal.bell)
|
this.xterm.setOption('bellStyle', config.terminal.bell)
|
||||||
this.xterm.setOption('cursorStyle', {
|
this.xterm.setOption('cursorStyle', {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user