提交 60358e7a 编写于 作者: E Eugene Pankov

xterm copy-on-select (fixes #400)

上级 f32bdbde
......@@ -16,6 +16,7 @@ export class XTermFrontend extends Frontend {
private zoom = 0
private resizeHandler: any
private configuredTheme: ITheme = {}
private copyOnSelect = false
constructor () {
super()
......@@ -33,6 +34,11 @@ export class XTermFrontend extends Frontend {
this.xterm.on('title', title => {
this.title.next(title)
})
this.xterm.on('selection', () => {
if (this.copyOnSelect) {
this.copySelection()
}
})
}
attach (host: HTMLElement): void {
......@@ -101,6 +107,8 @@ export class XTermFrontend extends Frontend {
this.configuredFontSize = config.terminal.fontSize
this.setFontSize()
this.copyOnSelect = config.terminal.copyOnSelect
let theme: ITheme = {
foreground: config.terminal.colorScheme.foreground,
background: (config.terminal.background === 'colorScheme') ? config.terminal.colorScheme.background : 'transparent',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册