mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fix #71465 - "find in files shortcut broken"
This commit is contained in:
committed by
Karl Burtram
parent
9bd7e30d18
commit
61f7f19d12
@@ -14,7 +14,7 @@ import { coalesce } from 'vs/base/common/arrays';
|
||||
|
||||
// Commands can get exeucted from a command pallete, from a context menu or from some list using a keybinding
|
||||
// To cover all these cases we need to properly compute the resource on which the command is being executed
|
||||
export function getResourceForCommand(resource: URI | object, listService: IListService, editorService: IEditorService): URI | null {
|
||||
export function getResourceForCommand(resource: URI | object | undefined, listService: IListService, editorService: IEditorService): URI | null {
|
||||
if (URI.isUri(resource)) {
|
||||
return resource;
|
||||
}
|
||||
@@ -44,7 +44,7 @@ export function getResourceForCommand(resource: URI | object, listService: IList
|
||||
return editorService.activeEditor ? toResource(editorService.activeEditor, { supportSideBySide: true }) : null;
|
||||
}
|
||||
|
||||
export function getMultiSelectedResources(resource: URI | object, listService: IListService, editorService: IEditorService): Array<URI> {
|
||||
export function getMultiSelectedResources(resource: URI | object | undefined, listService: IListService, editorService: IEditorService): Array<URI> {
|
||||
const list = listService.lastFocusedList;
|
||||
if (list && list.getHTMLElement() === document.activeElement) {
|
||||
// Explorer
|
||||
|
||||
@@ -361,7 +361,7 @@ const searchInFolderCommand: ICommandHandler = (accessor, resource?: URI) => {
|
||||
const panelService = accessor.get(IPanelService);
|
||||
const fileService = accessor.get(IFileService);
|
||||
const configurationService = accessor.get(IConfigurationService);
|
||||
const resources = resource && getMultiSelectedResources(resource, listService, accessor.get(IEditorService));
|
||||
const resources = getMultiSelectedResources(resource, listService, accessor.get(IEditorService));
|
||||
|
||||
return openSearchView(viewletService, panelService, configurationService, true).then(searchView => {
|
||||
if (resources && resources.length && searchView) {
|
||||
|
||||
Reference in New Issue
Block a user