Skip to content

Commit 35e77f6

Browse files
bjaspanBarry Jaspan
andauthored
Remove cyclic dependency between notebook.ts and notebookLegacy.ts. (#2122)
Once `isVscodeLegacyNotebookVersion` has determined that `getNotebookFromCellDocument` should call `getNotebookFromCellDocumentLegacy`, there is no need for `getNotebookFromCellDocumentLegacy` to determine that again, and doing so forces a cyclic import dependency. Co-authored-by: Barry Jaspan <[email protected]>
1 parent 8f88564 commit 35e77f6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/cursorless-vscode/src/ide/vscode/notebook/notebookLegacy.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { commands, NotebookDocument, TextDocument } from "vscode";
44
import { toVscodeEditor } from "../toVscodeEditor";
55
import type { VscodeIDE } from "../VscodeIDE";
66
import type { VscodeTextEditorImpl } from "../VscodeTextEditorImpl";
7-
import { getNotebookFromCellDocument } from "./notebook";
87

98
export async function focusNotebookCellLegacy(
109
ide: VscodeIDE,
@@ -18,10 +17,10 @@ export async function focusNotebookCellLegacy(
1817

1918
const vscodeActiveEditor = toVscodeEditor(activeTextEditor);
2019

21-
const editorNotebook = getNotebookFromCellDocument(
20+
const editorNotebook = getNotebookFromCellDocumentLegacy(
2221
editor.vscodeEditor.document,
2322
);
24-
const activeEditorNotebook = getNotebookFromCellDocument(
23+
const activeEditorNotebook = getNotebookFromCellDocumentLegacy(
2524
vscodeActiveEditor.document,
2625
);
2726

0 commit comments

Comments
 (0)