File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
src/vs/workbench/contrib/scm/browser Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1851
1851
"scm/incomingChanges/allChanges/context" : [
1852
1852
{
1853
1853
"command" : " git.viewAllChanges" ,
1854
- "when" : " scmProvider == git && config.multiDiffEditor.experimental.enabled" ,
1854
+ "when" : " scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled" ,
1855
1855
"group" : " inline@1"
1856
1856
}
1857
1857
],
1858
1858
"scm/incomingChanges/historyItem/context" : [
1859
1859
{
1860
1860
"command" : " git.viewCommit" ,
1861
- "when" : " scmProvider == git && config.multiDiffEditor.experimental.enabled" ,
1861
+ "when" : " scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled" ,
1862
1862
"group" : " inline@1"
1863
1863
}
1864
1864
],
1872
1872
"scm/outgoingChanges/allChanges/context" : [
1873
1873
{
1874
1874
"command" : " git.viewAllChanges" ,
1875
- "when" : " scmProvider == git && config.multiDiffEditor.experimental.enabled" ,
1875
+ "when" : " scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled" ,
1876
1876
"group" : " inline@1"
1877
1877
}
1878
1878
],
1879
1879
"scm/outgoingChanges/historyItem/context" : [
1880
1880
{
1881
1881
"command" : " git.viewCommit" ,
1882
- "when" : " scmProvider == git && config.multiDiffEditor.experimental.enabled" ,
1882
+ "when" : " scmProvider == git && scmHistoryItemFileCount != 0 && config.multiDiffEditor.experimental.enabled" ,
1883
1883
"group" : " inline@1"
1884
1884
}
1885
1885
],
Original file line number Diff line number Diff line change @@ -293,7 +293,11 @@ export class SCMHistoryProviderMenus implements ISCMHistoryProviderMenus, IDispo
293
293
MenuId . SCMOutgoingChangesHistoryItemContext ;
294
294
}
295
295
296
- result = this . menuService . createMenu ( menuId , this . contextKeyService ) ;
296
+ const contextKeyService = this . contextKeyService . createOverlay ( [
297
+ [ 'scmHistoryItemFileCount' , historyItem . statistics ?. files ?? 0 ] ,
298
+ ] ) ;
299
+
300
+ result = this . menuService . createMenu ( menuId , contextKeyService ) ;
297
301
this . historyItemMenus . set ( historyItem , result ) ;
298
302
}
299
303
You can’t perform that action at this time.
0 commit comments