提交 a56bc0c6 编写于 作者: M Matt Bierner

Don't write preferredLocation into workspace settings for find file references

上级 0ede5243
......@@ -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);
}
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册