File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/vs/workbench/contrib/interactive/browser Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ import { INotebookExecutionStateService } from 'vs/workbench/contrib/notebook/co
57
57
import { NOTEBOOK_KERNEL } from 'vs/workbench/contrib/notebook/common/notebookContextKeys' ;
58
58
import { ICursorPositionChangedEvent } from 'vs/editor/common/cursorEvents' ;
59
59
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions' ;
60
+ import { isEqual } from 'vs/base/common/resources' ;
60
61
61
62
const DECORATION_KEY = 'interactiveInputDecoration' ;
62
63
const INTERACTIVE_EDITOR_VIEW_STATE_PREFERENCE_KEY = 'InteractiveEditorViewState' ;
@@ -152,9 +153,11 @@ export class InteractiveEditor extends EditorPane {
152
153
codeEditorService . registerDecorationType ( 'interactive-decoration' , DECORATION_KEY , { } ) ;
153
154
this . _register ( this . #keybindingService. onDidUpdateKeybindings ( this . #updateInputDecoration, this ) ) ;
154
155
this . _register ( this . #notebookExecutionStateService. onDidChangeCellExecution ( ( e ) => {
155
- const cell = this . #notebookWidget. value ?. getCellByHandle ( e . cellHandle ) ;
156
- if ( cell && e . changed ?. state ) {
157
- this . #scrollIfNecessary( cell ) ;
156
+ if ( isEqual ( e . notebook , this . #notebookWidget. value ?. viewModel ?. notebookDocument . uri ) ) {
157
+ const cell = this . #notebookWidget. value ?. getCellByHandle ( e . cellHandle ) ;
158
+ if ( cell && e . changed ?. state ) {
159
+ this . #scrollIfNecessary( cell ) ;
160
+ }
158
161
}
159
162
} ) ) ;
160
163
}
You can’t perform that action at this time.
0 commit comments