mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-14 15:39:57 +00:00
prevent recovered tabs from blanking out
This commit is contained in:
parent
9dc2337787
commit
693edab597
@ -28,7 +28,7 @@
|
|||||||
"slug": "^0.9.3",
|
"slug": "^0.9.3",
|
||||||
"uuid": "^3.3.2",
|
"uuid": "^3.3.2",
|
||||||
"xterm": "3.10.1",
|
"xterm": "3.10.1",
|
||||||
"xterm-addon-ligatures-tmp": "^0.1.0-beta-1"
|
"xterm-addon-ligatures": "^0.1.0-beta-2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/common": "4.0.1",
|
"@angular/common": "4.0.1",
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
import { Frontend } from './frontend'
|
import { Frontend } from './frontend'
|
||||||
import { Terminal, ITheme } from 'xterm'
|
import { Terminal, ITheme } from 'xterm'
|
||||||
import * as fit from 'xterm/src/addons/fit/fit'
|
import { fit } from 'xterm/src/addons/fit/fit'
|
||||||
import * as ligatures from 'xterm-addon-ligatures-tmp'
|
import { enableLigatures } from 'xterm-addon-ligatures'
|
||||||
import 'xterm/lib/xterm.css'
|
import 'xterm/lib/xterm.css'
|
||||||
import './xterm.css'
|
import './xterm.css'
|
||||||
import deepEqual = require('deep-equal')
|
import deepEqual = require('deep-equal')
|
||||||
|
|
||||||
Terminal.applyAddon(fit)
|
|
||||||
Terminal.applyAddon(ligatures)
|
|
||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
export class XTermFrontend extends Frontend {
|
export class XTermFrontend extends Frontend {
|
||||||
enableResizing = true
|
enableResizing = true
|
||||||
@ -75,7 +72,7 @@ export class XTermFrontend extends Frontend {
|
|||||||
|
|
||||||
this.resizeHandler = () => {
|
this.resizeHandler = () => {
|
||||||
try {
|
try {
|
||||||
(this.xterm as any).fit()
|
fit(this.xterm)
|
||||||
} catch {
|
} catch {
|
||||||
// tends to throw when element wasn't shown yet
|
// tends to throw when element wasn't shown yet
|
||||||
}
|
}
|
||||||
@ -146,11 +143,14 @@ export class XTermFrontend extends Frontend {
|
|||||||
configure (): void {
|
configure (): void {
|
||||||
let config = this.configService.store
|
let config = this.configService.store
|
||||||
|
|
||||||
setTimeout(() => {
|
setImmediate(() => {
|
||||||
if (this.xterm.cols && this.xterm.rows) {
|
if (this.xterm.cols && this.xterm.rows) {
|
||||||
|
this.xtermCore.charMeasure.measure(this.xtermCore.options)
|
||||||
|
this.xtermCore.renderer._updateDimensions()
|
||||||
this.resizeHandler()
|
this.resizeHandler()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
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', {
|
||||||
@ -185,7 +185,7 @@ export class XTermFrontend extends Frontend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (config.terminal.ligatures && this.xterm.element) {
|
if (config.terminal.ligatures && this.xterm.element) {
|
||||||
(this.xterm as any).enableLigatures()
|
enableLigatures(this.xterm)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,10 +253,10 @@ windows-process-tree@^0.2.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
nan "^2.10.0"
|
nan "^2.10.0"
|
||||||
|
|
||||||
xterm-addon-ligatures-tmp@^0.1.0-beta-1:
|
xterm-addon-ligatures@^0.1.0-beta-2:
|
||||||
version "0.1.0-beta-2"
|
version "0.1.0-beta-2"
|
||||||
resolved "https://registry.yarnpkg.com/xterm-addon-ligatures-tmp/-/xterm-addon-ligatures-tmp-0.1.0-beta-2.tgz#1063a282b279b7586372dee7892cea59738c613e"
|
resolved "https://registry.yarnpkg.com/xterm-addon-ligatures/-/xterm-addon-ligatures-0.1.0-beta-2.tgz#def635fd0ca671fe61179629f8492b76c66dec6e"
|
||||||
integrity sha512-d+UoX5dfP7ZSEE/DnQlqubs7Bpw5UxLfTAibpo4pOU2KFw+lRlsLgHg5fcmhXoEvD9rj01enYTsIjedNwnwC5Q==
|
integrity sha512-MN5zCBxrF9xagzUYIpcgHS4L/Isod3m3ET5S7AUEEbymLJ+4zccio32eyq65Bcc50x/Bm57Hoh9gaSEUdojs8g==
|
||||||
dependencies:
|
dependencies:
|
||||||
font-finder "^1.0.2"
|
font-finder "^1.0.2"
|
||||||
font-ligatures "^1.3.1"
|
font-ligatures "^1.3.1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user