提交 b74aa446 编写于 作者: J Johannes Rieken

use Text blur/focus events, #49125

上级 fece020c
......@@ -119,6 +119,20 @@ suite('window namespace tests', () => {
});
});
test('active editor not always correct... #49125', async function () {
const [docA, docB] = await Promise.all([
workspace.openTextDocument(await createRandomFile()),
workspace.openTextDocument(await createRandomFile()),
]);
for (let c = 0; c < 4; c++) {
let editorA = await window.showTextDocument(docA, ViewColumn.One);
assert(window.activeTextEditor === editorA);
let editorB = await window.showTextDocument(docB, ViewColumn.Two);
assert(window.activeTextEditor === editorB);
}
});
// test('issue #25801 - default column when opening a file', async () => {
// const [docA, docB, docC] = await Promise.all([
// workspace.openTextDocument(await createRandomFile()),
......
......@@ -178,8 +178,8 @@ class MainThreadDocumentAndEditorStateComputer {
private _onDidAddEditor(e: ICodeEditor): void {
this._toDisposeOnEditorRemove.set(e.getId(), e.onDidChangeModel(() => this._updateState()));
this._toDisposeOnEditorRemove.set(e.getId(), e.onDidFocusEditor(() => this._updateState()));
this._toDisposeOnEditorRemove.set(e.getId(), e.onDidBlurEditor(() => this._updateState()));
this._toDisposeOnEditorRemove.set(e.getId(), e.onDidFocusEditorText(() => this._updateState()));
this._toDisposeOnEditorRemove.set(e.getId(), e.onDidBlurEditorText(() => this._updateState()));
this._updateState();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册