Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Sep 30, 2023
1 parent 54f9d97 commit 406c43e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Changelog

### `@jupyter-lsp/jupyterlab-lsp 5.0.0-rc.1`

- restore re-use of unused standalone connections

### `@jupyter-lsp/jupyterlab-lsp 5.0.0-rc.0`
Expand Down
15 changes: 8 additions & 7 deletions packages/jupyterlab-lsp/src/virtual/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,16 @@ export class VirtualDocument extends VirtualDocumentBase {
foreignDocument = this.foreignDocuments.get(extractor.language)!;
} else {
// if standalone, try to re-use existing connection to the server
let unusedStandalone = this.unusedStandaloneDocuments.get(
extractor.language
);
if (extractor.standalone && unusedStandalone.length > 0) {
foreignDocument = unusedStandalone.pop()!;
this.unusedDocuments.delete(foreignDocument);
} else {
let unusedStandalone = this.unusedStandaloneDocuments.get(
extractor.language
);
if (extractor.standalone && unusedStandalone.length > 0) {
foreignDocument = unusedStandalone.pop()!;
this.unusedDocuments.delete(foreignDocument);
} else {
// if (previous document does not exists) or (extractor produces standalone documents
// and no old standalone document could be reused): create a new document
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
foreignDocument = this.openForeign(
extractor.language,
Expand Down

0 comments on commit 406c43e

Please sign in to comment.