mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
Don't write preferredLocation into workspace settings for find file references
This commit is contained in:
@@ -67,13 +67,13 @@ class FileReferencesCommand implements Command {
|
||||
typeConverters.Location.fromTextSpan(this.client.toResource(reference.file), reference));
|
||||
|
||||
const config = vscode.workspace.getConfiguration('references');
|
||||
const existingSetting = config.get('preferredLocation', undefined);
|
||||
const existingSetting = config.inspect<string>('preferredLocation');
|
||||
|
||||
await config.update('preferredLocation', 'view');
|
||||
try {
|
||||
await vscode.commands.executeCommand('editor.action.showReferences', resource, new vscode.Position(0, 0), locations);
|
||||
} finally {
|
||||
await config.update('preferredLocation', existingSetting);
|
||||
await config.update('preferredLocation', existingSetting?.workspaceFolderValue ?? existingSetting?.workspaceValue);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user