Skip to content

Commit ff47259

Browse files
committed
Fix microsoft#71465 - "find in files shortcut broken"
1 parent 2b518c1 commit ff47259

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { coalesce } from 'vs/base/common/arrays';
1414

1515
// Commands can get exeucted from a command pallete, from a context menu or from some list using a keybinding
1616
// To cover all these cases we need to properly compute the resource on which the command is being executed
17-
export function getResourceForCommand(resource: URI | object, listService: IListService, editorService: IEditorService): URI | null {
17+
export function getResourceForCommand(resource: URI | object | undefined, listService: IListService, editorService: IEditorService): URI | null {
1818
if (URI.isUri(resource)) {
1919
return resource;
2020
}
@@ -44,7 +44,7 @@ export function getResourceForCommand(resource: URI | object, listService: IList
4444
return editorService.activeEditor ? toResource(editorService.activeEditor, { supportSideBySide: true }) : null;
4545
}
4646

47-
export function getMultiSelectedResources(resource: URI | object, listService: IListService, editorService: IEditorService): Array<URI> {
47+
export function getMultiSelectedResources(resource: URI | object | undefined, listService: IListService, editorService: IEditorService): Array<URI> {
4848
const list = listService.lastFocusedList;
4949
if (list && list.getHTMLElement() === document.activeElement) {
5050
// Explorer

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ const searchInFolderCommand: ICommandHandler = (accessor, resource?: URI) => {
363363
const panelService = accessor.get(IPanelService);
364364
const fileService = accessor.get(IFileService);
365365
const configurationService = accessor.get(IConfigurationService);
366-
const resources = resource && getMultiSelectedResources(resource, listService, accessor.get(IEditorService));
366+
const resources = getMultiSelectedResources(resource, listService, accessor.get(IEditorService));
367367

368368
return openSearchView(viewletService, panelService, configurationService, true).then(searchView => {
369369
if (resources && resources.length && searchView) {

0 commit comments

Comments
 (0)