Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the onDidChangeActiveNotebookEditorEmitter to fire correctly #14321

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/plugin-ext/src/plugin/notebook/notebooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ export class NotebooksExtImpl implements NotebooksExt {
if (delta.newActiveEditor === null) {
// clear active notebook as current active editor is non-notebook editor
this.activeNotebookEditor = undefined;
this.onDidChangeActiveNotebookEditorEmitter.fire(undefined);
} else if (delta.newActiveEditor) {
const activeEditor = this.editors.get(delta.newActiveEditor);
if (!activeEditor) {
Expand All @@ -341,8 +342,6 @@ export class NotebooksExtImpl implements NotebooksExt {
newActiveEditor: null
});
}
}
if (delta.newActiveEditor !== undefined && delta.newActiveEditor !== this.activeNotebookEditor?.id) {
this.onDidChangeActiveNotebookEditorEmitter.fire(this.activeNotebookEditor?.apiEditor);
}
}
Expand Down
Loading