2
0
mirror of https://github.com/Eugeny/tabby.git synced 2025-04-24 16:30:55 +08:00

prevent recovered tabs from blanking out

This commit is contained in:
Eugene Pankov 2019-04-28 11:41:31 +02:00
parent 9dc2337787
commit 693edab597
3 changed files with 12 additions and 12 deletions
terminus-terminal

@ -28,7 +28,7 @@
"slug": "^0.9.3",
"uuid": "^3.3.2",
"xterm": "3.10.1",
"xterm-addon-ligatures-tmp": "^0.1.0-beta-1"
"xterm-addon-ligatures": "^0.1.0-beta-2"
},
"peerDependencies": {
"@angular/common": "4.0.1",

@ -1,14 +1,11 @@
import { Frontend } from './frontend'
import { Terminal, ITheme } from 'xterm'
import * as fit from 'xterm/src/addons/fit/fit'
import * as ligatures from 'xterm-addon-ligatures-tmp'
import { fit } from 'xterm/src/addons/fit/fit'
import { enableLigatures } from 'xterm-addon-ligatures'
import 'xterm/lib/xterm.css'
import './xterm.css'
import deepEqual = require('deep-equal')
Terminal.applyAddon(fit)
Terminal.applyAddon(ligatures)
/** @hidden */
export class XTermFrontend extends Frontend {
enableResizing = true
@ -75,7 +72,7 @@ export class XTermFrontend extends Frontend {
this.resizeHandler = () => {
try {
(this.xterm as any).fit()
fit(this.xterm)
} catch {
// tends to throw when element wasn't shown yet
}
@ -146,11 +143,14 @@ export class XTermFrontend extends Frontend {
configure (): void {
let config = this.configService.store
setTimeout(() => {
setImmediate(() => {
if (this.xterm.cols && this.xterm.rows) {
this.xtermCore.charMeasure.measure(this.xtermCore.options)
this.xtermCore.renderer._updateDimensions()
this.resizeHandler()
}
})
this.xterm.setOption('fontFamily', `"${config.terminal.font}", "monospace-fallback", monospace`)
this.xterm.setOption('bellStyle', config.terminal.bell)
this.xterm.setOption('cursorStyle', {
@ -185,7 +185,7 @@ export class XTermFrontend extends Frontend {
}
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:
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"
resolved "https://registry.yarnpkg.com/xterm-addon-ligatures-tmp/-/xterm-addon-ligatures-tmp-0.1.0-beta-2.tgz#1063a282b279b7586372dee7892cea59738c613e"
integrity sha512-d+UoX5dfP7ZSEE/DnQlqubs7Bpw5UxLfTAibpo4pOU2KFw+lRlsLgHg5fcmhXoEvD9rj01enYTsIjedNwnwC5Q==
resolved "https://registry.yarnpkg.com/xterm-addon-ligatures/-/xterm-addon-ligatures-0.1.0-beta-2.tgz#def635fd0ca671fe61179629f8492b76c66dec6e"
integrity sha512-MN5zCBxrF9xagzUYIpcgHS4L/Isod3m3ET5S7AUEEbymLJ+4zccio32eyq65Bcc50x/Bm57Hoh9gaSEUdojs8g==
dependencies:
font-finder "^1.0.2"
font-ligatures "^1.3.1"