Get type safety in DI, fix character joiner not using buffer service

This commit is contained in:
Daniel Imms
2019-07-13 22:02:13 -07:00
parent 8359605951
commit 5cc8ad802c
10 changed files with 85 additions and 20 deletions
+5 -3
View File
@@ -14,6 +14,7 @@ import { CharacterJoinerRegistry } from 'browser/renderer/CharacterJoinerRegistr
import { Disposable } from 'common/Lifecycle';
import { IColorSet } from 'browser/Types';
import { ICharSizeService } from 'browser/services/Services';
import { IBufferService } from '../../out/common/services/Services';
export class Renderer extends Disposable implements IRenderer {
private _renderLayers: IRenderLayer[];
@@ -23,13 +24,14 @@ export class Renderer extends Disposable implements IRenderer {
public dimensions: IRenderDimensions;
constructor(
private _terminal: ITerminal,
private _colors: IColorSet,
private _charSizeService: ICharSizeService
private readonly _terminal: ITerminal,
readonly _bufferService: IBufferService,
private readonly _charSizeService: ICharSizeService
) {
super();
const allowTransparency = this._terminal.options.allowTransparency;
this._characterJoinerRegistry = new CharacterJoinerRegistry(_terminal);
this._characterJoinerRegistry = new CharacterJoinerRegistry(this._bufferService);
this._renderLayers = [
new TextRenderLayer(this._terminal.screenElement, 0, this._colors, this._characterJoinerRegistry, allowTransparency),