Skip to content

Commit 438a9d9

Browse files
authored
Disable more explorer async find features (microsoft#229814)
disable more exploreer async find features
1 parent 516cd37 commit 438a9d9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/vs/workbench/contrib/files/browser/fileActions.contribution.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const CUT_FILE_ID = 'filesExplorer.cut';
100100
KeybindingsRegistry.registerCommandAndKeybindingRule({
101101
id: CUT_FILE_ID,
102102
weight: KeybindingWeight.WorkbenchContrib + explorerCommandsWeightBonus,
103-
when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerRootContext.toNegated(), ExplorerResourceNotReadonlyContext),
103+
when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerRootContext.toNegated(), ExplorerResourceNotReadonlyContext, WorkbenchTreeFindOpen.toNegated()),
104104
primary: KeyMod.CtrlCmd | KeyCode.KeyX,
105105
handler: cutFileHandler,
106106
});
@@ -121,7 +121,7 @@ CommandsRegistry.registerCommand(PASTE_FILE_ID, pasteFileHandler);
121121
KeybindingsRegistry.registerKeybindingRule({
122122
id: `^${PASTE_FILE_ID}`, // the `^` enables pasting files into the explorer by preventing default bubble up
123123
weight: KeybindingWeight.WorkbenchContrib + explorerCommandsWeightBonus,
124-
when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerResourceNotReadonlyContext),
124+
when: ContextKeyExpr.and(FilesExplorerFocusCondition, ExplorerResourceNotReadonlyContext, WorkbenchTreeFindOpen.toNegated()),
125125
primary: KeyMod.CtrlCmd | KeyCode.KeyV,
126126
});
127127

@@ -538,7 +538,8 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
538538
order: 8,
539539
command: {
540540
id: CUT_FILE_ID,
541-
title: nls.localize('cut', "Cut")
541+
title: nls.localize('cut', "Cut"),
542+
precondition: WorkbenchTreeFindOpen.toNegated()
542543
},
543544
when: ContextKeyExpr.and(ExplorerRootContext.toNegated(), ExplorerResourceNotReadonlyContext)
544545
});
@@ -548,7 +549,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
548549
order: 10,
549550
command: {
550551
id: COPY_FILE_ID,
551-
title: COPY_FILE_LABEL
552+
title: COPY_FILE_LABEL,
552553
},
553554
when: ExplorerRootContext.toNegated()
554555
});
@@ -559,7 +560,7 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
559560
command: {
560561
id: PASTE_FILE_ID,
561562
title: PASTE_FILE_LABEL,
562-
precondition: ContextKeyExpr.and(ExplorerResourceNotReadonlyContext, FileCopiedContext)
563+
precondition: ContextKeyExpr.and(ExplorerResourceNotReadonlyContext, FileCopiedContext, WorkbenchTreeFindOpen.toNegated())
563564
},
564565
when: ExplorerFolderContext
565566
});

0 commit comments

Comments
 (0)