From f3b7866a19bc9cab90044602abb9c789464786eb Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 23 Sep 2019 07:47:02 -0700 Subject: [PATCH 1/2] Fix NPE when open called twice Fixes #2433 --- src/Terminal.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Terminal.ts b/src/Terminal.ts index d793abfc..098c383b 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -604,8 +604,8 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp // Performance: Add viewport and helper elements from the fragment this.element.appendChild(fragment); - this._theme = this.options.theme; - this.options.theme = null; + this._theme = this.options.theme || this._theme; + this.options.theme = undefined; this._colorManager = new ColorManager(document, this.options.allowTransparency); this._colorManager.setTheme(this._theme); From 2fd24849b28ebbb52ad228f1354b746bb122c0d0 Mon Sep 17 00:00:00 2001 From: Vitaly Petrov Date: Tue, 24 Sep 2019 17:46:12 +0300 Subject: [PATCH 2/2] Update README.md --- addons/xterm-addon-attach/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/xterm-addon-attach/README.md b/addons/xterm-addon-attach/README.md index 2040455c..67ebf17b 100644 --- a/addons/xterm-addon-attach/README.md +++ b/addons/xterm-addon-attach/README.md @@ -12,7 +12,7 @@ npm install --save xterm-addon-attach ```ts import { Terminal } from 'xterm'; -import { FitAddon } from 'xterm-addon-attach'; +import { AttachAddon } from 'xterm-addon-attach'; const terminal = new Terminal(); const attachAddon = new AttachAddon(webSocket);