Merge pull request #2871 from Tyriar/layers

Support dependency injection in UnicodeService
This commit is contained in:
Daniel Imms
2020-04-25 08:44:25 -07:00
committed by GitHub
8 changed files with 14 additions and 11 deletions
+2 -2
View File
@@ -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;
}
+3 -4
View File
@@ -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,
+1 -1
View File
@@ -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
) {
}