Skip to content

Commit 00b1383

Browse files
authored
Search viewlet sometimes showing two replace buttons (microsoft#167114)
Fixes microsoft#167097
1 parent a7c16ee commit 00b1383

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vs/workbench/contrib/search/browser/searchResultsView.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class FolderMatchRenderer extends Disposable implements ICompressibleTree
129129
const disposableElements = new DisposableStore();
130130
disposables.add(disposableElements);
131131

132-
const contextKeyService = this.contextKeyService.createOverlay([[FolderFocusKey.key, true]]);
132+
const contextKeyService = this.contextKeyService.createOverlay([[FolderFocusKey.key, true], [FileFocusKey.key, false], [MatchFocusKey.key, false]]);
133133
const instantiationService = this.instantiationService.createChild(new ServiceCollection([IContextKeyService, contextKeyService]));
134134
const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
135135
menuOptions: {
@@ -217,7 +217,7 @@ export class FileMatchRenderer extends Disposable implements ICompressibleTreeRe
217217
disposables.add(attachBadgeStyler(badge, this.themeService));
218218
const actionBarContainer = DOM.append(fileMatchElement, DOM.$('.actionBarContainer'));
219219

220-
const contextKeyService = this.contextKeyService.createOverlay([[FileFocusKey.key, true]]);
220+
const contextKeyService = this.contextKeyService.createOverlay([[FileFocusKey.key, true], [FolderFocusKey.key, false], [MatchFocusKey.key, false]]);
221221
const instantiationService = this.instantiationService.createChild(new ServiceCollection([IContextKeyService, contextKeyService]));
222222
const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
223223
menuOptions: {
@@ -291,7 +291,7 @@ export class MatchRenderer extends Disposable implements ICompressibleTreeRender
291291

292292
const disposables = new DisposableStore();
293293

294-
const contextKeyService = this.contextKeyService.createOverlay([[MatchFocusKey.key, true]]);
294+
const contextKeyService = this.contextKeyService.createOverlay([[MatchFocusKey.key, true], [FileFocusKey.key, false], [FolderFocusKey.key, false]]);
295295
const instantiationService = this.instantiationService.createChild(new ServiceCollection([IContextKeyService, contextKeyService]));
296296
const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
297297
menuOptions: {

0 commit comments

Comments
 (0)