Change:
Issue Type: <bBug</bIf I right-click on a folder in the explorer view and select 'Find in Folder' the search panel appears with the correct folder selected in the 'files to include' input. If I perform the keyboard shortcut to 'Find in Folder' with a folder selected, the search panel appears but the 'files to include' input does not have the selected folder. This is on a MacOS Mojave 10.14.4 VS Code version: Code - Insiders 1.33.0-insider (, 2019-03-29T10:48:35.896Z) OS version: Darwin x64 18.5.0 <details<summarySystem Info</summary </details<details<summaryExtensions (56)</summaryExtensionVersion ------ rainbow-brackets0.0.6 html-snippets0.2.1 markdown-toc1.5.6 Bookmarks10.4.1 npm-intellisense1.3.0 sql-formatter1.0.2 vscode-markdownlint0.25.1 vscode-eslint1.8.2 githistory0.4.6 javadebugger0.1.5 gitlens9.5.1 EditorConfig0.13.0 graphviz-preview1.3.1 tslint1.0.43 vscode-npm-script0.3.5 prettier-vscode1.8.1 docker-explorer0.1.6 vscode-yarn1.6.0 vscode-javac0.2.16 vscode-pull-request-github0.5.1 gc-excelviewer2.1.29 docthis0.7.1 vscode-codemetrics1.18.0 javascript-test-runner1.0.0 dotenv1.0.1 python2019.3.6215 azure-account0.8.0 csharp1.18.0 Go0.9.2 debugger-for-chrome4.11.3 sqltools0.17.9 language-liquid0.1.1 printcode3.0.0 vetur0.17.1 vscode-jscpd0.3.4 vscode-docker0.6.1 quicktype12.0.46 java0.42.0 vscode-yaml0.4.0 RustyCode0.19.1 scala0.2.0 metals1.2.7 code-settings-sync3.2.7 dot0.0.1 Align0.2.0 code-spell-checker1.6.10 unique-window-colors1.0.23 html-preview-vscode0.2.5 shellcheck0.6.0 sort-lines1.8.0 vscode-java-debug0.17.0 vscode-icons8.4.0 vscode-wakatime1.2.13 quokka-vscode1.0.200 vscode-todo-highlight1.0.4 change-case1.0.0 (1 theme extensions excluded) </details<!-- generated by issue reporter --
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like: <!-- score: 0.513 --- <!-- score: 0.509 --- <!-- score: 0.492 --- <!-- score: 0.49 --- <!-- score: 0.483 --<!-- potentialduplicatescomment --

Discussion:
// 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 <del> export function getResourceForCommand(resource: URI | object, listService: IListService, editorService: IEditorService): URI | null { </del> <ins> export function getResourceForCommand(resource: URI | object | undefined, listService: IListService, editorService: IEditorService): URI | null { </ins> if (URI.isUri(resource)) { return resource; }

return editorService.activeEditor ? toResource(editorService.activeEditor, { supportSideBySide: true }) : null; } <del> export function getMultiSelectedResources(resource: URI | object, listService: IListService, editorService: IEditorService): Array<URI> { </del> <ins> export function getMultiSelectedResources(resource: URI | object | undefined, listService: IListService, editorService: IEditorService): Array<URI> { </ins> const list = listService.lastFocusedList; if (list && list.getHTMLElement() === document.activeElement) { // Explorer

const panelService = accessor.get(IPanelService); const fileService = accessor.get(IFileService); const configurationService = accessor.get(IConfigurationService); <del> const resources = resource && getMultiSelectedResources(resource, listService, accessor.get(IEditorService)); </del> <ins> const resources = getMultiSelectedResources(resource, listService, accessor.get(IEditorService)); </ins> return openSearchView(viewletService, panelService, configurationService, true).then(searchView => { if (resources && resources.length && searchView) {