提交 b94b20e6 编写于 作者: R Rob Lourens

Remove stub TPromise cancel handler

上级 07c4f78c
......@@ -149,37 +149,33 @@ export class SearchService extends Disposable implements ISearchService {
return TPromise.wrapError(errs[0]);
});
return new TPromise((c, e) => {
providerPromise.then(value => {
const values = [value];
const result: ISearchComplete = {
limitHit: false,
results: [],
stats: undefined
};
return providerPromise.then(value => {
const values = [value];
// TODO@joh
// sorting, disjunct results
for (const value of values) {
if (!value) {
continue;
}
// TODO@joh individual stats/limit
result.stats = value.stats || result.stats;
result.limitHit = value.limitHit || result.limitHit;
const result: ISearchComplete = {
limitHit: false,
results: [],
stats: undefined
};
for (const match of value.results) {
if (!localResults.has(match.resource)) {
result.results.push(match);
}
// TODO@joh
// sorting, disjunct results
for (const value of values) {
if (!value) {
continue;
}
// TODO@joh individual stats/limit
result.stats = value.stats || result.stats;
result.limitHit = value.limitHit || result.limitHit;
for (const match of value.results) {
if (!localResults.has(match.resource)) {
result.results.push(match);
}
}
}
return result;
}).then(c, e);
}, () => {
// Need the OpenAnythingHandler to stop trying to cancel this promise, https://github.com/Microsoft/vscode/issues/56137
return result;
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册