Merge pull request #2871 from Tyriar/layers
Support dependency injection in UnicodeService
This commit is contained in:
@@ -9,13 +9,13 @@ import { IBufferLine } from 'common/Types';
|
||||
import { Linkifier } from 'browser/Linkifier';
|
||||
import { BufferLine } from 'common/buffer/BufferLine';
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { MockLogService, MockBufferService, MockOptionsService } from 'common/TestUtils.test';
|
||||
import { MockLogService, MockBufferService } from 'common/TestUtils.test';
|
||||
import { IBufferService } from 'common/services/Services';
|
||||
import { UnicodeService } from 'common/services/UnicodeService';
|
||||
|
||||
class TestLinkifier extends Linkifier {
|
||||
constructor(bufferService: IBufferService) {
|
||||
super(bufferService, new MockLogService(), new MockOptionsService(), new UnicodeService());
|
||||
super(bufferService, new MockLogService(), new UnicodeService());
|
||||
Linkifier._timeBeforeLatency = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,10 +43,9 @@ export class Linkifier implements ILinkifier {
|
||||
public get onLinkTooltip(): IEvent<ILinkifierEvent> { return this._onLinkTooltip.event; }
|
||||
|
||||
constructor(
|
||||
protected readonly _bufferService: IBufferService,
|
||||
private readonly _logService: ILogService,
|
||||
private readonly _optionsService: IOptionsService,
|
||||
private readonly _unicodeService: IUnicodeService
|
||||
@IBufferService protected readonly _bufferService: IBufferService,
|
||||
@ILogService private readonly _logService: ILogService,
|
||||
@IUnicodeService private readonly _unicodeService: IUnicodeService
|
||||
) {
|
||||
this._rowsToLinkify = {
|
||||
start: undefined,
|
||||
|
||||
@@ -32,7 +32,7 @@ export class Linkifier2 implements ILinkifier2 {
|
||||
public get onHideLinkUnderline(): IEvent<ILinkifierEvent> { return this._onHideLinkUnderline.event; }
|
||||
|
||||
constructor(
|
||||
private readonly _bufferService: IBufferService
|
||||
@IBufferService private readonly _bufferService: IBufferService
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user