Skip to content

Commit 541a377

Browse files
committed
Fix hanging connections for additional virtual documents
1 parent c781693 commit 541a377

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/adapters/jupyterlab/jl_adapter.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export abstract class JupyterLabWidgetAdapter
8080
>;
8181
protected abstract current_completion_connector: LSPConnector;
8282
private _tooltip: FreeTooltip;
83-
protected connection_manager: DocumentConnectionManager;
83+
public connection_manager: DocumentConnectionManager;
8484

8585
protected constructor(
8686
protected app: JupyterFrontEnd,
@@ -188,6 +188,10 @@ export abstract class JupyterLabWidgetAdapter
188188
this.connection_manager.connect_document_signals(virtual_document);
189189
virtual_document.changed.connect(this.document_changed.bind(this));
190190
await this.connect(virtual_document).catch(console.warn);
191+
192+
virtual_document.foreign_document_opened.connect((host, context) => {
193+
this.connect(context.foreign_document).catch(console.warn);
194+
});
191195
}
192196

193197
document_changed(virtual_document: VirtualDocument) {

0 commit comments

Comments
 (0)