Skip to content

Commit f0adc39

Browse files
committed
Use VS Buffer
1 parent a42d4d2 commit f0adc39

2 files changed

Lines changed: 2 additions & 117 deletions

File tree

src/vs/base/common/uint.ts

Lines changed: 0 additions & 112 deletions
This file was deleted.

src/vs/workbench/services/output/common/outputChannelModel.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { isNumber } from 'vs/base/common/types';
1717
import { EditOperation } from 'vs/editor/common/core/editOperation';
1818
import { Position } from 'vs/editor/common/core/position';
1919
import { binarySearch } from 'vs/base/common/arrays';
20-
import { toUint8ArrayBuffer } from 'vs/base/common/uint';
20+
import { VSBuffer } from 'vs/base/common/buffer';
2121

2222
export interface IOutputChannelModel extends IDisposable {
2323
readonly onDidAppendedContent: Event<void>;
@@ -259,10 +259,7 @@ class FileOutputChannelModel extends AbstractFileOutputChannelModel implements I
259259
}
260260

261261
protected getByteLength(str: string): number {
262-
if (typeof Buffer !== 'undefined') {
263-
return Buffer.from(str).byteLength;
264-
}
265-
return toUint8ArrayBuffer(str).byteLength;
262+
return VSBuffer.fromString(str).byteLength;
266263
}
267264

268265
update(size?: number): void {

0 commit comments

Comments
 (0)