mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Theme unfocused cursor using cursor color
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user