Theme unfocused cursor using cursor color

This commit is contained in:
Daniel Imms
2017-09-04 08:09:43 -07:00
parent 29a7ee30f3
commit 0bfdff0b39
2 changed files with 1 additions and 22 deletions
-19
View File
@@ -1,25 +1,6 @@
import { IColorSet } from './Interfaces';
import { ITheme } from '../Interfaces';
export enum COLOR_CODES {
BLACK = 0,
RED = 1,
GREEN = 2,
YELLOW = 3,
BLUE = 4,
MAGENTA = 5,
CYAN = 6,
WHITE = 7,
BRIGHT_BLACK = 8,
BRIGHT_RED = 9,
BRIGHT_GREEN = 10,
BRIGHT_YELLOW = 11,
BRIGHT_BLUE = 12,
BRIGHT_MAGENTA = 13,
BRIGHT_CYAN = 14,
BRIGHT_WHITE = 15
}
const DEFAULT_FOREGROUND = '#ffffff';
const DEFAULT_BACKGROUND = '#000000';
const DEFAULT_CURSOR = '#ffffff';
+1 -3
View File
@@ -5,7 +5,6 @@ import { GridCache } from './GridCache';
import { FLAGS } from './Types';
import { BaseRenderLayer } from './BaseRenderLayer';
import { CharData } from '../Types';
import { COLOR_CODES } from './ColorManager';
interface CursorState {
x: number;
@@ -131,7 +130,7 @@ export class CursorRenderLayer extends BaseRenderLayer {
if (!terminal.isFocused) {
this._clearCursor();
this._ctx.save();
this._ctx.fillStyle = this.colors.ansi[COLOR_CODES.WHITE];
this._ctx.fillStyle = this.colors.cursor;
this._renderBlurCursor(terminal, terminal.buffer.x, viewportRelativeCursorY, charData);
this._ctx.restore();
this._state.x = terminal.buffer.x;
@@ -161,7 +160,6 @@ export class CursorRenderLayer extends BaseRenderLayer {
}
this._ctx.save();
this._ctx.fillStyle = this.colors.ansi[COLOR_CODES.WHITE];
this._cursorRenderers[terminal.options.cursorStyle || 'block'](terminal, terminal.buffer.x, viewportRelativeCursorY, charData);
this._ctx.restore();