File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/interactive-window/editor-integration Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff 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 ) ) ;
You can’t perform that action at this time.
0 commit comments