diff --git a/src/sql/parts/notebook/notebookInput.ts b/src/sql/parts/notebook/notebookInput.ts index 991ec861ed..fff390bd6d 100644 --- a/src/sql/parts/notebook/notebookInput.ts +++ b/src/sql/parts/notebook/notebookInput.ts @@ -177,4 +177,20 @@ export class NotebookInput extends EditorInput { setDirty(isDirty: boolean): void { this._model.setDirty(isDirty); } + + + public matches(otherInput: any): boolean { + if (super.matches(otherInput) === true) { + return true; + } + + if (otherInput instanceof NotebookInput) { + const otherNotebookEditorInput = otherInput; + + // Compare by resource + return otherNotebookEditorInput.notebookUri.toString() === this.notebookUri.toString(); + } + + return false; + } } \ No newline at end of file