mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
:chore: address some todos
This commit is contained in:
parent
3860c90cd8
commit
ae0a103755
|
@ -220,7 +220,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
|||
this._win.setSheetOffset(22); // offset dialogs by the height of the custom title bar if we have any
|
||||
}
|
||||
|
||||
// TODO@bpasero (Electron 4 regression): when running on multiple displays where the target display
|
||||
// TODO@electron (Electron 4 regression): when running on multiple displays where the target display
|
||||
// to open the window has a larger resolution than the primary display, the window will not size
|
||||
// correctly unless we set the bounds again (https://github.com/microsoft/vscode/issues/74872)
|
||||
//
|
||||
|
@ -581,7 +581,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
|||
// Unresponsive
|
||||
if (type === WindowError.UNRESPONSIVE) {
|
||||
if (this.isExtensionDevelopmentHost || this.isExtensionTestHost || (this._win && this._win.webContents && this._win.webContents.isDevToolsOpened())) {
|
||||
// TODO@bpasero Workaround for https://github.com/microsoft/vscode/issues/56994
|
||||
// TODO@electron Workaround for https://github.com/microsoft/vscode/issues/56994
|
||||
// In certain cases the window can report unresponsiveness because a breakpoint was hit
|
||||
// and the process is stopped executing. The most typical cases are:
|
||||
// - devtools are opened and debugging happens
|
||||
|
|
|
@ -205,7 +205,7 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
|
|||
registerListeners() {
|
||||
|
||||
// forward changes to dirty state
|
||||
// todo@bpasero this seem way too complicated... is there an easy way to
|
||||
// todo@rebornix todo@mjbvz this seem way too complicated... is there an easy way to
|
||||
// the actual resource from a working copy?
|
||||
this._register(this._workingCopyService.onDidChangeDirty(e => {
|
||||
if (e.resource.scheme !== Schemas.vscodeNotebook) {
|
||||
|
|
|
@ -334,7 +334,7 @@ export class NativeWindow extends Disposable {
|
|||
private onWindowResize(e: UIEvent, retry: boolean): void {
|
||||
if (e.target === window) {
|
||||
if (window.document && window.document.body && window.document.body.clientWidth === 0) {
|
||||
// TODO@bpasero this is an electron issue on macOS when simple fullscreen is enabled
|
||||
// TODO@electron this is an electron issue on macOS when simple fullscreen is enabled
|
||||
// where for some reason the window clientWidth is reported as 0 when switching
|
||||
// between simple fullscreen and normal screen. In that case we schedule the layout
|
||||
// call at the next animation frame once, in the hope that the dimensions are
|
||||
|
|
|
@ -11,7 +11,7 @@ import * as streams from 'vs/base/common/stream';
|
|||
import * as iconv from 'iconv-lite-umd';
|
||||
import { getPathFromAmdModule } from 'vs/base/common/amd';
|
||||
import { newWriteableBufferStream, VSBuffer, VSBufferReadableStream, streamToBufferReadableStream } from 'vs/base/common/buffer';
|
||||
import { isWindows } from 'vs/base/common/platform';
|
||||
import { splitLines } from 'vs/base/common/strings';
|
||||
|
||||
export async function detectEncodingByBOM(file: string): Promise<typeof encoding.UTF16be | typeof encoding.UTF16le | typeof encoding.UTF8_with_bom | null> {
|
||||
try {
|
||||
|
@ -351,7 +351,7 @@ suite('Encoding', () => {
|
|||
assert.strictEqual(content.length, 65537);
|
||||
});
|
||||
|
||||
(isWindows /* TODO@bpasero why does this fail on windows */ ? test.skip : test)('toDecodeStream - some stream (UTF-8 issue #102202)', async function () {
|
||||
test('toDecodeStream - some stream (UTF-8 issue #102202)', async function () {
|
||||
const path = getPathFromAmdModule(require, './fixtures/issue_102202.txt');
|
||||
const source = streamToBufferReadableStream(fs.createReadStream(path));
|
||||
|
||||
|
@ -360,7 +360,7 @@ suite('Encoding', () => {
|
|||
assert.ok(stream);
|
||||
|
||||
const content = await readAllAsString(stream);
|
||||
const lines = content.split('\n');
|
||||
const lines = splitLines(content);
|
||||
|
||||
assert.strictEqual(lines[981].toString(), '啊啊啊啊啊啊aaa啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊,啊啊啊啊啊啊啊啊啊啊啊。');
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue