Don't write preferredLocation into workspace settings for find file references
This commit is contained in:
parent
0ede524326
commit
a56bc0c671
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue