mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
Create workspace object always and adopt accordingly
This commit is contained in:
@@ -59,11 +59,10 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
|
||||
// --- search ---
|
||||
|
||||
$startSearch(include: string, exclude: string, maxResults: number, requestId: number): Thenable<URI[]> {
|
||||
if (this._contextService.getWorkbenchState() === WorkbenchState.EMPTY) {
|
||||
const workspace = this._contextService.getWorkspace();
|
||||
if (!workspace.roots.length) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const workspace = this._contextService.getWorkspace();
|
||||
const query: ISearchQuery = {
|
||||
folderQueries: workspace.roots.map(root => ({ folder: root })),
|
||||
type: QueryType.File,
|
||||
|
||||
Reference in New Issue
Block a user