Change:
VSCode Version: Code - Insiders 1.13.0-insider (, 2017-05-26T05:14:23.944Z) OS Version: Windows_NT ia32 10.0. These 2 apis should honor the ViewColumn if specified, but if left they should default to the column of the active editor Having this will eliminate code in many extensions such as: Which fails for anything that isn't a text document (since will be missing)
Unsure what that means?
Sorry, I meant that the could be if the actual active "editor" is a non-text document (image, extension, etc). And can be for a diff editor (maybe other cases?). So an extension can't reliably get the real "active" column
+1 for not setting as default if not specified so that we prefer the currently active editor column when documents open.
PR addresses it, but it conflicts with another change see: Any thoughts on coming to a resolution on that -- I would LOVE to see this fixed.
we have an option for editors to reveal if they are open in another group (see ). I am actually surprised that was fixed and marked as important because the normal workbench behaviour is to open an editor in the currently active editor group. On top of that, the solution also does not seem right because what if I start in column 2 and I open a document in column 3 and then open the document from column 2 again. It opens in column 1?
I was surprised as well as that was my argument too :)
I could rebase that PR again (since its quite old) if you'd like, but it will still fail because of a test checking for
Well, we had this behaviour in place, extensions rely on it , and we don't want to break them. That's why this is tricky The solution is to use column 1 if not specified, no column-math happens:

Discussion:
assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.One); }); <ins> test('issue #27408 - showTextDocument & vscode.diff always default to ViewColumn.One', async () => { const [docA, docB, docC] = await Promise.all([ workspace.openTextDocument(await createRandomFile()), workspace.openTextDocument(await createRandomFile()), workspace.openTextDocument(await createRandomFile()) ]); await window.showTextDocument(docA, ViewColumn.One); await window.showTextDocument(docB, ViewColumn.Two); assert.ok(window.activeTextEditor); assert.ok(window.activeTextEditor!.document === docB); assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.Two); await window.showTextDocument(docC, ViewColumn.Active); assert.ok(window.activeTextEditor!.document === docC); assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.Two); }); </ins> test('issue #5362 - Incorrect TextEditor passed by onDidChangeTextEditorSelection', (done) => { const file10Path = join(workspace.rootPath || '', './10linefile.ts'); const file30Path = join(workspace.rootPath || '', './30linefile.ts');

* used to show editors side by side. */ export enum ViewColumn { <ins> Active = -1, </ins> One = 1, Two = 2, Three = 3

editorColumn = EditorPosition.TWO; } else if (column === <number>types.ViewColumn.Three) { editorColumn = EditorPosition.THREE; <ins> } else if (column === <number>types.ViewColumn.Active) { editorColumn = undefined; </ins> } return editorColumn; }

} export enum ViewColumn { <ins> Active = -1, </ins> One = 1, Two = 2, Three = 3