Skip to content

Commit 3fa15ee

Browse files
committed
rework document closing (connection doesn't go away)
1 parent f2a79d6 commit 3fa15ee

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

atest/Keywords.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ Setup Notebook
184184
Copy File examples${/}${file} ${OUTPUT DIR}${/}home${/}${file}
185185
Try to Close All Tabs
186186
Open ${file} in ${MENU NOTEBOOK}
187-
Wait Until Fully Initialized
188187
Capture Page Screenshot 00-opened.png
188+
Wait Until Fully Initialized
189189
Capture Page Screenshot 01-initialized.png
190190

191191
Open Diagnostics Panel

packages/jupyterlab-lsp/src/adapters/codemirror/features/highlights.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ export class Highlights extends CodeMirrorLSPFeature {
7373
};
7474

7575
protected onCursorActivity = async () => {
76+
if (!this.virtual_editor?.virtual_document?.document_info) {
77+
return;
78+
}
7679
let root_position: IRootPosition;
7780

7881
try {

packages/jupyterlab-lsp/src/connection_manager.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,7 @@ export class DocumentConnectionManager {
256256
}
257257

258258
public unregister_document(virtual_document: VirtualDocument) {
259-
const connection = this.connections.get(virtual_document.id_path);
260259
this.connections.delete(virtual_document.id_path);
261-
this.closed.emit({ connection, virtual_document });
262260
}
263261
}
264262

0 commit comments

Comments
 (0)