mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Fix #61081 - Ensure no search results are returned after cancel
This commit is contained in:
@@ -135,7 +135,15 @@ export class SearchService extends Disposable implements ISearchService {
|
||||
return TPromise.wrapError(canceled());
|
||||
}
|
||||
|
||||
return this.searchWithProviders(query, onProgress, token);
|
||||
const progressCallback = (item: ISearchProgressItem) => {
|
||||
if (token && token.isCancellationRequested) {
|
||||
return;
|
||||
}
|
||||
|
||||
onProgress(item);
|
||||
};
|
||||
|
||||
return this.searchWithProviders(query, progressCallback, token);
|
||||
})
|
||||
.then(completes => {
|
||||
completes = completes.filter(c => !!c);
|
||||
|
||||
Reference in New Issue
Block a user