@@ -100,7 +100,7 @@ const CUT_FILE_ID = 'filesExplorer.cut';
100
100
KeybindingsRegistry . registerCommandAndKeybindingRule ( {
101
101
id : CUT_FILE_ID ,
102
102
weight : KeybindingWeight . WorkbenchContrib + explorerCommandsWeightBonus ,
103
- when : ContextKeyExpr . and ( FilesExplorerFocusCondition , ExplorerRootContext . toNegated ( ) , ExplorerResourceNotReadonlyContext ) ,
103
+ when : ContextKeyExpr . and ( FilesExplorerFocusCondition , ExplorerRootContext . toNegated ( ) , ExplorerResourceNotReadonlyContext , WorkbenchTreeFindOpen . toNegated ( ) ) ,
104
104
primary : KeyMod . CtrlCmd | KeyCode . KeyX ,
105
105
handler : cutFileHandler ,
106
106
} ) ;
@@ -121,7 +121,7 @@ CommandsRegistry.registerCommand(PASTE_FILE_ID, pasteFileHandler);
121
121
KeybindingsRegistry . registerKeybindingRule ( {
122
122
id : `^${ PASTE_FILE_ID } ` , // the `^` enables pasting files into the explorer by preventing default bubble up
123
123
weight : KeybindingWeight . WorkbenchContrib + explorerCommandsWeightBonus ,
124
- when : ContextKeyExpr . and ( FilesExplorerFocusCondition , ExplorerResourceNotReadonlyContext ) ,
124
+ when : ContextKeyExpr . and ( FilesExplorerFocusCondition , ExplorerResourceNotReadonlyContext , WorkbenchTreeFindOpen . toNegated ( ) ) ,
125
125
primary : KeyMod . CtrlCmd | KeyCode . KeyV ,
126
126
} ) ;
127
127
@@ -538,7 +538,8 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
538
538
order : 8 ,
539
539
command : {
540
540
id : CUT_FILE_ID ,
541
- title : nls . localize ( 'cut' , "Cut" )
541
+ title : nls . localize ( 'cut' , "Cut" ) ,
542
+ precondition : WorkbenchTreeFindOpen . toNegated ( )
542
543
} ,
543
544
when : ContextKeyExpr . and ( ExplorerRootContext . toNegated ( ) , ExplorerResourceNotReadonlyContext )
544
545
} ) ;
@@ -548,7 +549,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
548
549
order : 10 ,
549
550
command : {
550
551
id : COPY_FILE_ID ,
551
- title : COPY_FILE_LABEL
552
+ title : COPY_FILE_LABEL ,
552
553
} ,
553
554
when : ExplorerRootContext . toNegated ( )
554
555
} ) ;
@@ -559,7 +560,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
559
560
command : {
560
561
id : PASTE_FILE_ID ,
561
562
title : PASTE_FILE_LABEL ,
562
- precondition : ContextKeyExpr . and ( ExplorerResourceNotReadonlyContext , FileCopiedContext )
563
+ precondition : ContextKeyExpr . and ( ExplorerResourceNotReadonlyContext , FileCopiedContext , WorkbenchTreeFindOpen . toNegated ( ) )
563
564
} ,
564
565
when : ExplorerFolderContext
565
566
} ) ;
0 commit comments