mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-12 22:08:04 -05:00
return empty promise, don't reveal undefined, fixes #6739
This commit is contained in:
@@ -119,7 +119,7 @@ export class ReferencesController implements editorCommon.IEditorContribution {
|
||||
&& getConfigurationValue(this._configurationService.getConfiguration(), 'editor.stablePeek', false)) {
|
||||
|
||||
// when stable peek is configured we don't close
|
||||
// the peek window on selecting the editor
|
||||
// the peek window on selecting the editor
|
||||
break;
|
||||
}
|
||||
case 'side':
|
||||
@@ -163,13 +163,15 @@ export class ReferencesController implements editorCommon.IEditorContribution {
|
||||
return this._widget.setModel(this._model).then(() => {
|
||||
|
||||
// set title
|
||||
this._widget.setMetaTitle(options.getMetaTitle(model));
|
||||
this._widget.setMetaTitle(options.getMetaTitle(this._model));
|
||||
|
||||
// set 'best' selection
|
||||
let uri = this._editor.getModel().uri;
|
||||
let pos = { lineNumber: range.startLineNumber, column: range.startColumn };
|
||||
let selection = this._model.nearestReference(uri, pos);
|
||||
return this._widget.setSelection(selection);
|
||||
if (selection) {
|
||||
return this._widget.setSelection(selection);
|
||||
}
|
||||
});
|
||||
|
||||
}, error => {
|
||||
|
||||
@@ -621,7 +621,7 @@ export class ReferenceWidget extends PeekViewWidget {
|
||||
if (this._model.empty) {
|
||||
this.setTitle('');
|
||||
this._messageContainer.innerHtml(nls.localize('noResults', "No results")).show();
|
||||
return;
|
||||
return TPromise.as(void 0);
|
||||
}
|
||||
|
||||
this._messageContainer.hide();
|
||||
|
||||
Reference in New Issue
Block a user