diff --git a/src/CharWidth.api.ts b/src/CharWidth.api.ts index baa8600c..035208cc 100644 --- a/src/CharWidth.api.ts +++ b/src/CharWidth.api.ts @@ -5,7 +5,6 @@ import * as puppeteer from 'puppeteer'; import { assert } from 'chai'; -// import { getStringCellWidth } from './CharWidth'; import { ITerminalOptions } from 'xterm'; const APP = 'http://127.0.0.1:3000/test'; diff --git a/src/InputHandler.ts b/src/InputHandler.ts index c3344489..354f3962 100644 --- a/src/InputHandler.ts +++ b/src/InputHandler.ts @@ -7,7 +7,7 @@ import { IInputHandler, IInputHandlingTerminal } from './Types'; import { C0, C1 } from 'common/data/EscapeSequences'; import { CHARSETS, DEFAULT_CHARSET } from 'core/data/Charsets'; -import { wcwidth } from './CharWidth'; +import { wcwidth } from './common/CharWidth'; import { EscapeSequenceParser } from 'core/parser/EscapeSequenceParser'; import { IDisposable } from 'xterm'; import { Disposable } from 'common/Lifecycle'; diff --git a/src/Linkifier.ts b/src/Linkifier.ts index ae9a0734..a66c1388 100644 --- a/src/Linkifier.ts +++ b/src/Linkifier.ts @@ -5,7 +5,7 @@ import { ILinkifierEvent, ILinkMatcher, LinkMatcherHandler, ILinkMatcherOptions, ILinkifier, ITerminal, IBufferStringIteratorResult, IMouseZoneManager } from './Types'; import { MouseZone } from './MouseZoneManager'; -import { getStringCellWidth } from './CharWidth'; +import { getStringCellWidth } from 'common/CharWidth'; import { EventEmitter2, IEvent } from 'common/EventEmitter2'; /** diff --git a/src/CharWidth.test.ts b/src/common/CharWidth.test.ts similarity index 98% rename from src/CharWidth.test.ts rename to src/common/CharWidth.test.ts index 9b5a75af..6b2493ee 100644 --- a/src/CharWidth.test.ts +++ b/src/common/CharWidth.test.ts @@ -4,7 +4,7 @@ */ import { assert } from 'chai'; -import { wcwidth } from './CharWidth'; +import { wcwidth } from 'common/CharWidth'; it('wcwidth should match all values from the old implementation', function(): void { // old implementation @@ -125,7 +125,7 @@ it('wcwidth should match all values from the old implementation', function(): vo return 1; } const control = opts.control | 0; - let table: number[] | Uint32Array = null; + let table: number[] | Uint32Array | undefined; function initTable(): number[] | Uint32Array { // lookup table for BMP const CODEPOINTS = 65536; // BMP holds 65536 codepoints diff --git a/src/CharWidth.ts b/src/common/CharWidth.ts similarity index 100% rename from src/CharWidth.ts rename to src/common/CharWidth.ts