possible fix for #11079

This commit is contained in:
Benjamin Pasero 2016-08-29 07:43:50 +02:00
parent 9e8fd2b4e8
commit 83b97d009f
2 changed files with 3 additions and 4 deletions

View file

@ -704,7 +704,6 @@ export class QuickOpenController extends WorkbenchComponent implements IQuickOpe
let quickOpenModel = new QuickOpenModel(matchingHistoryEntries, this.actionProvider);
let resultPromises: TPromise<void>[] = [];
resolvedHandlers.forEach(resolvedHandler => {
const result = resolvedHandler.getResults(value);
const promise = (<QuickOpenHandlerResult>result).promisedModel || <TPromise<IModel<any>>>result;
shortResponseTime = shortResponseTime || !!(<QuickOpenHandlerResult>result).shortResponseTime;

View file

@ -158,7 +158,7 @@ export class OpenFileHandler extends QuickOpenHandler {
private cacheQuery(cacheKey: string): ISearchQuery {
const options: IQueryOptions = {
folderResources: this.contextService.getWorkspace() ? [this.contextService.getWorkspace().resource] : [],
extraFileResources: [],
extraFileResources: getOutOfWorkspaceEditorResources(this.editorGroupService, this.contextService),
filePattern: '',
cacheKey: cacheKey,
maxResults: 0,
@ -193,7 +193,7 @@ class CacheState {
private promise: TPromise<void>;
constructor (private cacheQuery: (cacheKey: string) => ISearchQuery, private doLoad: (query: ISearchQuery) => TPromise<any>, private doDispose: (cacheKey: string) => TPromise<void>, private previous: CacheState) {
constructor(private cacheQuery: (cacheKey: string) => ISearchQuery, private doLoad: (query: ISearchQuery) => TPromise<any>, private doDispose: (cacheKey: string) => TPromise<void>, private previous: CacheState) {
this.query = cacheQuery(this._cacheKey);
if (this.previous) {
const current = objects.assign({}, this.query, { cacheKey: null });
@ -227,7 +227,7 @@ class CacheState {
}
public dispose(): void {
this.promise.then(null, () => {})
this.promise.then(null, () => { })
.then(() => {
this._isLoaded = false;
return this.doDispose(this._cacheKey);