提交 c575fa5e 编写于 作者: E Eugene Pankov

build fix

上级 c161023a
......@@ -2,7 +2,7 @@ import { Frontend, SearchOptions } from './frontend'
import { Terminal, ITheme } from 'xterm'
import { getCSSFontFamily } from '../utils'
import { FitAddon } from 'xterm-addon-fit'
import { enableLigatures } from 'xterm-addon-ligatures'
import { LigaturesAddon } from 'xterm-addon-ligatures'
import { SearchAddon } from 'xterm-addon-search'
import { WebglAddon } from 'xterm-addon-webgl'
import './xterm.css'
......@@ -29,6 +29,7 @@ export class XTermFrontend extends Frontend {
private copyOnSelect = false
private search = new SearchAddon()
private fitAddon = new FitAddon()
private ligaturesAddon: LigaturesAddon
private opened = false
constructor () {
......@@ -119,10 +120,6 @@ export class XTermFrontend extends Frontend {
this.xterm.loadAddon(new WebglAddon())
}
if (this.configService.store.terminal.ligatures) {
enableLigatures(this.xterm)
}
this.ready.next(null)
this.ready.complete()
......@@ -225,8 +222,9 @@ export class XTermFrontend extends Frontend {
this.configuredTheme = theme
}
if (this.opened && config.terminal.ligatures) {
enableLigatures(this.xterm)
if (this.opened && config.terminal.ligatures && !this.ligaturesAddon) {
this.ligaturesAddon = new LigaturesAddon()
this.xterm.loadAddon(this.ligaturesAddon)
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册