Move cursorHidden into core service

This commit is contained in:
Daniel Imms
2019-11-07 18:22:18 -08:00
parent 9d7935f8bd
commit c204ab00e0
4 changed files with 4 additions and 9 deletions
+3 -3
View File
@@ -1449,7 +1449,7 @@ export class InputHandler extends Disposable implements IInputHandler {
this._logService.debug('DECSET 1015 not supported (see #2507)');
break;
case 25: // show cursor
this._terminal.cursorHidden = false;
this._coreService.isCursorHidden = false;
break;
case 1048: // alt screen cursor
this.saveCursor();
@@ -1620,7 +1620,7 @@ export class InputHandler extends Disposable implements IInputHandler {
this._logService.debug('DECRST 1015 not supported (see #2507)');
break;
case 25: // hide cursor
this._terminal.cursorHidden = true;
this._coreService.isCursorHidden = true;
break;
case 1048: // alt screen cursor
this.restoreCursor();
@@ -1954,7 +1954,7 @@ export class InputHandler extends Disposable implements IInputHandler {
* http://vt100.net/docs/vt220-rm/table4-10.html
*/
public softReset(params: IParams): void {
this._terminal.cursorHidden = false;
this._coreService.isCursorHidden = false;
this._terminal.insertMode = false;
this._terminal.originMode = false;
this._terminal.wraparoundMode = true; // defaults: xterm - true, vt100 - false
-3
View File
@@ -90,8 +90,6 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
// TODO: We should remove options once components adopt optionsService
public get options(): ITerminalOptions { return this.optionsService.options; }
public cursorHidden: boolean;
private _customKeyEventHandler: CustomKeyEventHandler;
// common services
@@ -249,7 +247,6 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
private _setup(): void {
this._parent = document ? document.body : null;
this.cursorHidden = false;
this._customKeyEventHandler = null;
// modes
-2
View File
@@ -38,7 +38,6 @@ export interface IInputHandlingTerminal {
savedCols: number;
mouseEvents: CoreMouseEventType;
sendFocus: boolean;
cursorHidden: boolean;
buffers: IBufferSet;
buffer: IBuffer;
@@ -154,7 +153,6 @@ export interface IInputHandler {
export interface ITerminal extends IPublicTerminal, IElementAccessor, IBufferAccessor, ILinkifierAccessor {
screenElement: HTMLElement;
browser: IBrowser;
cursorHidden: boolean;
buffer: IBuffer;
buffers: IBufferSet;
isFocused: boolean;
+1 -1
View File
@@ -128,7 +128,7 @@ export class CursorRenderLayer extends BaseRenderLayer {
private _render(triggeredByAnimationFrame: boolean): void {
// Don't draw the cursor if it's hidden
if (!this._coreService.isCursorInitialized || this._terminal.cursorHidden) {
if (!this._coreService.isCursorInitialized || this._coreService.isCursorHidden) {
this._clearCursor();
return;
}