Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable search in workspace only when there is a workspace root
When there is no workspace open, it's still possible to open and type in the quick search in workspace widget. Doing so prints an error in the console: Uncaught (in promise) Error: Search failed: no workspace root. at SearchInWorkspaceService.<anonymous> (search-in-workspace-service.ts:98) at step (search-in-workspace-service.ts:6) at Object.next (search-in-workspace-service.ts:6) at fulfilled (search-in-workspace-service.ts:6) at <anonymous> This patch makes the command handler conditionally enabled based on whether there is a workspace root or not. Therefore, without a workspace open, the menu entry will be greyed out. Fixes eclipse-theia#1306 Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
- Loading branch information