From 63b25813e7f840dd76d99fe78860145431abcb04 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 26 Jun 2019 10:44:06 -0700 Subject: [PATCH] Fix soft reset breaking default attribute Fixes #2196 --- src/InputHandler.ts | 2 +- src/core/buffer/BufferLine.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/InputHandler.ts b/src/InputHandler.ts index 94c7e96b2..7e0057dbf 100644 --- a/src/InputHandler.ts +++ b/src/InputHandler.ts @@ -1816,7 +1816,7 @@ export class InputHandler extends Disposable implements IInputHandler { this._terminal.applicationCursor = false; this._terminal.buffer.scrollTop = 0; this._terminal.buffer.scrollBottom = this._terminal.rows - 1; - this._terminal.curAttrData = DEFAULT_ATTR_DATA; + this._terminal.curAttrData = DEFAULT_ATTR_DATA.clone(); this._terminal.buffer.x = this._terminal.buffer.y = 0; // ? this._terminal.charset = null; this._terminal.glevel = 0; // ?? diff --git a/src/core/buffer/BufferLine.ts b/src/core/buffer/BufferLine.ts index 154cc5984..7ced096c4 100644 --- a/src/core/buffer/BufferLine.ts +++ b/src/core/buffer/BufferLine.ts @@ -217,7 +217,7 @@ export class AttributeData implements IAttributeData { } } -export const DEFAULT_ATTR_DATA = new AttributeData(); +export const DEFAULT_ATTR_DATA = Object.freeze(new AttributeData()); /** * CellData - represents a single Cell in the terminal buffer.