Skip to content

onDidChangeTabs fires before vscode.window.activeTextEditor has been updated #201841

@mjbvz

Description

@mjbvz
  1. In an extension, listen for vscode.window.tabGroups.onDidChangeTabs
  2. Switch between editor tabs in a single editor group

Bug
When the event is fired, if I check vscode.window.activeTextEditor I see that the active editor is still for the previous tab. It seems like visibleTextEditors is correctly updated

Here I've just switched from x2.ts to x.ts and have paused on the call to onDidChangeTabs

Image

Metadata

Metadata

Assignees

Labels

apibugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions