Skip to content

Commit 6db3b11

Browse files
authored
no code lenses in cells or repl inputs (#16023)
1 parent 7b7c900 commit 6db3b11

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/interactive-window/editor-integration/codelensprovider.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ export class DataScienceCodeLensProvider implements IDataScienceCodeLensProvider
6565
private onChangedActiveTextEditor() {
6666
const activeEditor = vscode.window.activeTextEditor;
6767

68-
if (!activeEditor || activeEditor.document.languageId != PYTHON_LANGUAGE) {
68+
if (
69+
!activeEditor ||
70+
activeEditor.document.languageId != PYTHON_LANGUAGE ||
71+
[NotebookCellScheme, InteractiveInputScheme].includes(activeEditor.document.uri.scheme)
72+
) {
6973
// set the context to false so our command doesn't run for other files
7074
const hasCellsContext = new ContextKey(EditorContexts.HasCodeCells);
7175
hasCellsContext.set(false).catch((ex) => logger.warn('Failed to set jupyter.HasCodeCells context', ex));

0 commit comments

Comments
 (0)