diff --git a/terminus-core/src/services/app.service.ts b/terminus-core/src/services/app.service.ts
index 1451b8b9..6e266db1 100644
--- a/terminus-core/src/services/app.service.ts
+++ b/terminus-core/src/services/app.service.ts
@@ -44,6 +44,9 @@ export class AppService {
}
selectTab (tab: BaseTabComponent) {
+ if (this.activeTab == tab) {
+ return
+ }
if (this.tabs.includes(this.activeTab)) {
this.lastTabIndex = this.tabs.indexOf(this.activeTab)
} else {
diff --git a/terminus-terminal/src/components/terminalTab.component.scss b/terminus-terminal/src/components/terminalTab.component.scss
index aebf4fa3..5be43d0f 100644
--- a/terminus-terminal/src/components/terminalTab.component.scss
+++ b/terminus-terminal/src/components/terminalTab.component.scss
@@ -9,6 +9,8 @@
display: block;
overflow: hidden;
margin: 15px;
+ transition: opacity ease-out 0.1s;
+ opacity: 0;
div[style]:last-child {
background: black !important;
diff --git a/terminus-terminal/src/components/terminalTab.component.ts b/terminus-terminal/src/components/terminalTab.component.ts
index 65b4b565..61620136 100644
--- a/terminus-terminal/src/components/terminalTab.component.ts
+++ b/terminus-terminal/src/components/terminalTab.component.ts
@@ -1,6 +1,6 @@
import { BehaviorSubject, ReplaySubject, Subject, Subscription } from 'rxjs'
import { Component, NgZone, Inject, ViewChild, HostBinding, Input } from '@angular/core'
-import { AppService, ConfigService, BaseTabComponent, ThemesService } from 'terminus-core'
+import { AppService, ConfigService, BaseTabComponent, ThemesService, HostAppService, Platform } from 'terminus-core'
import { Session } from '../services/sessions.service'
@@ -10,7 +10,7 @@ import { hterm, preferenceManager } from '../hterm'
@Component({
selector: 'terminalTab',
- template: '
',
+ template: '',
styles: [require('./terminalTab.component.scss')],
})
export class TerminalTabComponent extends BaseTabComponent {
@@ -24,6 +24,7 @@ export class TerminalTabComponent extends BaseTabComponent {
contentUpdated$ = new Subject()
alternateScreenActive$ = new BehaviorSubject(false)
mouseEvent$ = new Subject()
+ htermVisible = false
@Input() session: Session
@ViewChild('content') content
@HostBinding('style.background-color') backgroundColor: string
@@ -33,6 +34,7 @@ export class TerminalTabComponent extends BaseTabComponent {
private zone: NgZone,
private app: AppService,
private themes: ThemesService,
+ private hostApp: HostAppService,
public config: ConfigService,
@Inject(TerminalDecorator) private decorators: TerminalDecorator[],
) {
@@ -63,6 +65,7 @@ export class TerminalTabComponent extends BaseTabComponent {
this.attachHTermHandlers(this.hterm)
this.hterm.onTerminalReady = () => {
+ this.htermVisible = true
this.hterm.installKeyboard()
this.io = this.hterm.io.push()
this.attachIOHandlers(this.io)
@@ -106,12 +109,6 @@ export class TerminalTabComponent extends BaseTabComponent {
})
}
- const _decorate = hterm.scrollPort_.decorate.bind(hterm.scrollPort_)
- hterm.scrollPort_.decorate = (...args) => {
- _decorate(...args)
- hterm.scrollPort_.screen_.style.cssText += `; padding-right: ${hterm.scrollPort_.screen_.offsetWidth - hterm.scrollPort_.screen_.clientWidth}px;`
- }
-
const _setAlternateMode = hterm.setAlternateMode.bind(hterm)
hterm.setAlternateMode = (state) => {
_setAlternateMode(state)
@@ -198,6 +195,8 @@ export class TerminalTabComponent extends BaseTabComponent {
preferenceManager.set('enable-clipboard-notice', false)
preferenceManager.set('receive-encoding', 'raw')
preferenceManager.set('send-encoding', 'raw')
+ preferenceManager.set('ctrl-plus-minus-zero-zoom', false)
+ preferenceManager.set('scrollbar-visible', this.hostApp.platform == Platform.macOS)
if (config.terminal.colorScheme.foreground) {
preferenceManager.set('foreground-color', config.terminal.colorScheme.foreground)
@@ -210,7 +209,7 @@ export class TerminalTabComponent extends BaseTabComponent {
} else {
this.backgroundColor = null
// hterm can't parse "transparent"
- preferenceManager.set('background-color', themes.findCurrentTheme().terminalBackground)
+ preferenceManager.set('background-color', this.themes.findCurrentTheme().terminalBackground)
}
if (config.terminal.colorScheme.colors) {
preferenceManager.set('color-palette-overrides', config.terminal.colorScheme.colors)
diff --git a/terminus-terminal/src/config.ts b/terminus-terminal/src/config.ts
index 99c40df7..a5cd6f7b 100644
--- a/terminus-terminal/src/config.ts
+++ b/terminus-terminal/src/config.ts
@@ -6,7 +6,7 @@ export class TerminalConfigProvider extends ConfigProvider {
terminal: {
fontSize: 14,
bell: 'off',
- bracketedPaste: true,
+ bracketedPaste: false,
background: 'theme',
colorScheme: {
__nonStructural: true,