File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
src/vs/workbench/contrib/notebook/browser/diff Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -1666,7 +1666,7 @@ export class ModifiedElement extends AbstractElementRenderer {
1666
1666
this . _cellHeader . buildHeader ( ) ;
1667
1667
renderSourceEditor ( ) ;
1668
1668
1669
- const scopedContextKeyService = this . contextKeyService . createScoped ( this . _cellHeaderContainer ) ;
1669
+ const scopedContextKeyService = this . contextKeyService . createScoped ( this . templateData . inputToolbarContainer ) ;
1670
1670
this . _register ( scopedContextKeyService ) ;
1671
1671
const inputChanged = NOTEBOOK_DIFF_CELL_INPUT . bindTo ( scopedContextKeyService ) ;
1672
1672
inputChanged . set ( this . cell . modified . textModel . getValue ( ) !== this . cell . original . textModel . getValue ( ) ) ;
@@ -1681,21 +1681,16 @@ export class ModifiedElement extends AbstractElementRenderer {
1681
1681
cell : this . cell
1682
1682
} ;
1683
1683
1684
- const actions : IAction [ ] = [ ] ;
1685
-
1686
1684
const refreshToolbar = ( ) => {
1687
1685
const ignore = this . textConfigurationService . getValue < boolean > ( this . cell . modified . uri , 'diffEditor.ignoreTrimWhitespace' ) ;
1688
1686
ignoreWhitespace . set ( ignore ) ;
1689
-
1690
1687
const hasChanges = this . cell . modified . textModel . getValue ( ) !== this . cell . original . textModel . getValue ( ) ;
1691
1688
inputChanged . set ( hasChanges ) ;
1692
1689
1693
- if ( ! actions . length ) {
1690
+ if ( hasChanges ) {
1691
+ const actions : IAction [ ] = [ ] ;
1694
1692
const menu = this . menuService . getMenuActions ( MenuId . NotebookDiffCellInputTitle , scopedContextKeyService , { shouldForwardArgs : true } ) ;
1695
1693
createAndFillInActionBarActions ( menu , actions ) ;
1696
- }
1697
-
1698
- if ( hasChanges ) {
1699
1694
this . _toolbar . setActions ( actions ) ;
1700
1695
} else {
1701
1696
this . _toolbar . setActions ( [ ] ) ;
Original file line number Diff line number Diff line change @@ -248,7 +248,8 @@ export class CellDiffSideBySideRenderer implements IListRenderer<SideBySideDiffE
248
248
}
249
249
250
250
return undefined ;
251
- }
251
+ } ,
252
+ highlightToggledItems : true
252
253
} ) ;
253
254
254
255
const metadataHeaderContainer = DOM . append ( diffEditorContainer , DOM . $ ( '.metadata-header-container' ) ) ;
You can’t perform that action at this time.
0 commit comments