register service
This commit is contained in:
@@ -548,7 +548,6 @@ function addDecoration() {
|
|||||||
const marker = term.addMarker(1);
|
const marker = term.addMarker(1);
|
||||||
const decoration = term.registerDecoration({ marker });
|
const decoration = term.registerDecoration({ marker });
|
||||||
decoration.onRender((e) => {
|
decoration.onRender((e) => {
|
||||||
console.log('onRender', e);
|
|
||||||
e.style.backgroundColor = 'red';
|
e.style.backgroundColor = 'red';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ import { CharacterJoinerService } from 'browser/services/CharacterJoinerService'
|
|||||||
import { toRgbString } from 'common/input/XParseColor';
|
import { toRgbString } from 'common/input/XParseColor';
|
||||||
import { BufferDecorationRenderer } from 'browser/Decorations/BufferDecorationRenderer';
|
import { BufferDecorationRenderer } from 'browser/Decorations/BufferDecorationRenderer';
|
||||||
import { OverviewRulerRenderer } from 'browser/Decorations/OverviewRulerRenderer';
|
import { OverviewRulerRenderer } from 'browser/Decorations/OverviewRulerRenderer';
|
||||||
// import { IDecorationService } from 'common/services/Services';
|
|
||||||
import { DecorationService } from 'common/services/DecorationService';
|
import { DecorationService } from 'common/services/DecorationService';
|
||||||
|
import { IDecorationService } from 'common/services/Services';
|
||||||
|
|
||||||
// Let it work inside Node.js for automated testing purposes.
|
// Let it work inside Node.js for automated testing purposes.
|
||||||
const document: Document = (typeof window !== 'undefined') ? window.document : null as any;
|
const document: Document = (typeof window !== 'undefined') ? window.document : null as any;
|
||||||
@@ -169,6 +169,7 @@ export class Terminal extends CoreTerminal implements ITerminal {
|
|||||||
this.linkifier = this._instantiationService.createInstance(Linkifier);
|
this.linkifier = this._instantiationService.createInstance(Linkifier);
|
||||||
this.linkifier2 = this.register(this._instantiationService.createInstance(Linkifier2));
|
this.linkifier2 = this.register(this._instantiationService.createInstance(Linkifier2));
|
||||||
this._decorationService = this._instantiationService.createInstance(DecorationService);
|
this._decorationService = this._instantiationService.createInstance(DecorationService);
|
||||||
|
this._instantiationService.setService(IDecorationService, this._decorationService);
|
||||||
|
|
||||||
// Setup InputHandler listeners
|
// Setup InputHandler listeners
|
||||||
this.register(this._inputHandler.onRequestBell(() => this.bell()));
|
this.register(this._inputHandler.onRequestBell(() => this.bell()));
|
||||||
|
|||||||
Reference in New Issue
Block a user