mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
fix open of created or renamed file
This commit is contained in:
parent
481713a0e1
commit
4dfc5a6341
1 changed files with 2 additions and 1 deletions
|
@ -26,7 +26,8 @@ export async function handle(change: SourceChange) {
|
||||||
const toReveal = change.cursorPosition;
|
const toReveal = change.cursorPosition;
|
||||||
await vscode.workspace.applyEdit(wsEdit);
|
await vscode.workspace.applyEdit(wsEdit);
|
||||||
if (toOpen) {
|
if (toOpen) {
|
||||||
const doc = await vscode.workspace.openTextDocument(toOpen);
|
const toOpenUri = vscode.Uri.parse(toOpen);
|
||||||
|
const doc = await vscode.workspace.openTextDocument(toOpenUri);
|
||||||
await vscode.window.showTextDocument(doc);
|
await vscode.window.showTextDocument(doc);
|
||||||
} else if (toReveal) {
|
} else if (toReveal) {
|
||||||
const uri = Server.client.protocol2CodeConverter.asUri(
|
const uri = Server.client.protocol2CodeConverter.asUri(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue