From 44ed0b9cebaeeced6afcc6ebe193797ea876d8dd Mon Sep 17 00:00:00 2001 From: npezza93 Date: Sat, 12 Aug 2017 11:40:50 -0400 Subject: [PATCH] Dont hardcode as many color codes in xterm.ts --- src/Terminal.ts | 3 ++- src/xterm.css | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Terminal.ts b/src/Terminal.ts index 5c9b51a2..62449654 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -1890,9 +1890,10 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT } if (this.options.bellStyles.indexOf(BellStyles.Visual) > -1) { var cursor = this.element.querySelector('.terminal-cursor') as HTMLElement; + var originalBackground = cursor.style.backgroundColor; cursor.style.backgroundColor = "#fff"; setTimeout(function() { - cursor.style.backgroundColor = "#e6e6e6"; + cursor.style.backgroundColor = originalBackground; }, 200); } } diff --git a/src/xterm.css b/src/xterm.css index 299b1e37..7ccad12f 100644 --- a/src/xterm.css +++ b/src/xterm.css @@ -94,12 +94,12 @@ } .terminal:not(.focus) .terminal-cursor { - outline: 1px solid #e6e6e6; + outline: 1px solid #eeeeec; outline-offset: -1px; } .terminal.xterm-cursor-style-block.focus:not(.xterm-cursor-blink-on) .terminal-cursor { - background-color: #e6e6e6; + background-color: #eeeeec; color: #000; } @@ -107,7 +107,7 @@ .terminal.focus.xterm-cursor-style-underline:not(.xterm-cursor-blink-on) .terminal-cursor::before { content: ''; position: absolute; - background-color: ##e6e6e6; + background-color: #eeeeec; } .terminal.focus.xterm-cursor-style-bar:not(.xterm-cursor-blink-on) .terminal-cursor::before {