Skip to content

Commit

Permalink
Remove cyclic dependency between notebook.ts and notebookLegacy.ts. (#…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
bjaspan and Barry Jaspan authored Dec 11, 2023
1 parent 8f88564 commit 35e77f6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { commands, NotebookDocument, TextDocument } from "vscode";
import { toVscodeEditor } from "../toVscodeEditor";
import type { VscodeIDE } from "../VscodeIDE";
import type { VscodeTextEditorImpl } from "../VscodeTextEditorImpl";
import { getNotebookFromCellDocument } from "./notebook";

export async function focusNotebookCellLegacy(
ide: VscodeIDE,
Expand All @@ -18,10 +17,10 @@ export async function focusNotebookCellLegacy(

const vscodeActiveEditor = toVscodeEditor(activeTextEditor);

const editorNotebook = getNotebookFromCellDocument(
const editorNotebook = getNotebookFromCellDocumentLegacy(
editor.vscodeEditor.document,
);
const activeEditorNotebook = getNotebookFromCellDocument(
const activeEditorNotebook = getNotebookFromCellDocumentLegacy(
vscodeActiveEditor.document,
);

Expand Down

0 comments on commit 35e77f6

Please sign in to comment.