@@ -71,7 +71,7 @@ import { NotebookOverviewRuler } from 'vs/workbench/contrib/notebook/browser/vie
71
71
import { ListTopCellToolbar } from 'vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar' ;
72
72
import { NotebookTextModel } from 'vs/workbench/contrib/notebook/common/model/notebookTextModel' ;
73
73
import { CellEditType , CellKind , INotebookSearchOptions , RENDERER_NOT_AVAILABLE , SelectionStateType } from 'vs/workbench/contrib/notebook/common/notebookCommon' ;
74
- import { NOTEBOOK_CURSOR_NAVIGATION_MODE , NOTEBOOK_EDITOR_EDITABLE , NOTEBOOK_EDITOR_FOCUSED , NOTEBOOK_OUTPUT_FOCUSED } from 'vs/workbench/contrib/notebook/common/notebookContextKeys' ;
74
+ import { NOTEBOOK_CURSOR_NAVIGATION_MODE , NOTEBOOK_EDITOR_EDITABLE , NOTEBOOK_EDITOR_FOCUSED , NOTEBOOK_OUTPUT_FOCUSED , NOTEBOOK_OUPTUT_INPUT_FOCUSED } from 'vs/workbench/contrib/notebook/common/notebookContextKeys' ;
75
75
import { INotebookExecutionService } from 'vs/workbench/contrib/notebook/common/notebookExecutionService' ;
76
76
import { INotebookExecutionStateService } from 'vs/workbench/contrib/notebook/common/notebookExecutionStateService' ;
77
77
import { INotebookKernelService } from 'vs/workbench/contrib/notebook/common/notebookKernelService' ;
@@ -198,6 +198,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
198
198
private readonly _outputFocus : IContextKey < boolean > ;
199
199
private readonly _editorEditable : IContextKey < boolean > ;
200
200
private readonly _cursorNavMode : IContextKey < boolean > ;
201
+ private readonly _outputInputFocus : IContextKey < boolean > ;
201
202
protected readonly _contributions = new Map < string , INotebookEditorContribution > ( ) ;
202
203
private _scrollBeyondLastLine : boolean ;
203
204
private readonly _insetModifyQueueByOutputId = new SequencerByKey < string > ( ) ;
@@ -390,6 +391,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
390
391
this . _isVisible = true ;
391
392
this . _editorFocus = NOTEBOOK_EDITOR_FOCUSED . bindTo ( this . scopedContextKeyService ) ;
392
393
this . _outputFocus = NOTEBOOK_OUTPUT_FOCUSED . bindTo ( this . scopedContextKeyService ) ;
394
+ this . _outputInputFocus = NOTEBOOK_OUPTUT_INPUT_FOCUSED . bindTo ( this . scopedContextKeyService ) ;
393
395
this . _editorEditable = NOTEBOOK_EDITOR_EDITABLE . bindTo ( this . scopedContextKeyService ) ;
394
396
this . _cursorNavMode = NOTEBOOK_CURSOR_NAVIGATION_MODE . bindTo ( this . scopedContextKeyService ) ;
395
397
@@ -1349,6 +1351,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
1349
1351
didEndDragMarkupCell : that . _didEndDragMarkupCell . bind ( that ) ,
1350
1352
didResizeOutput : that . _didResizeOutput . bind ( that ) ,
1351
1353
updatePerformanceMetadata : that . _updatePerformanceMetadata . bind ( that ) ,
1354
+ didFocusOutputInputChange : that . _didFocusOutputInputChange . bind ( that ) ,
1352
1355
} , id , viewType , resource , {
1353
1356
...this . _notebookOptions . computeWebviewOptions ( ) ,
1354
1357
fontFamily : this . _generateFontFamily ( )
@@ -1975,6 +1978,10 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
1975
1978
return false ;
1976
1979
}
1977
1980
1981
+ _didFocusOutputInputChange ( hasFocus : boolean ) {
1982
+ this . _outputInputFocus . set ( hasFocus ) ;
1983
+ }
1984
+
1978
1985
//#endregion
1979
1986
1980
1987
//#region Editor Features
0 commit comments