mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-21 04:20:11 -04:00
Merge from vscode 6268feb42ba4f2e2fa15484e88c9af60d254998c (#6530)
This commit is contained in:
@@ -27,6 +27,7 @@ import { CommandsRegistry, ICommandHandler } from 'vs/platform/commands/common/c
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { coalesce, flatten } from 'vs/base/common/arrays';
|
||||
|
||||
export const defaultReferenceSearchOptions: RequestOptions = {
|
||||
getMetaTitle(model) {
|
||||
@@ -287,15 +288,7 @@ export function provideReferences(model: ITextModel, position: Position, token:
|
||||
});
|
||||
});
|
||||
|
||||
return Promise.all(promises).then(references => {
|
||||
let result: Location[] = [];
|
||||
for (let ref of references) {
|
||||
if (ref) {
|
||||
result.push(...ref);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
});
|
||||
return Promise.all(promises).then(references => flatten(coalesce(references)));
|
||||
}
|
||||
|
||||
registerDefaultLanguageCommand('_executeReferenceProvider', (model, position) => provideReferences(model, position, CancellationToken.None));
|
||||
|
||||
Reference in New Issue
Block a user