File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ export class RazorDocumentManager implements IRazorDocumentManager {
302302 // vscode.workspace.openTextDocument may send a textDocument/didOpen
303303 // request to the C# language server. We need to keep track of
304304 // this to make sure we don't send a duplicate request later on.
305- const razorUri = vscode . Uri . parse ( ' file:' + document . path , true ) ;
305+ const razorUri = vscode . Uri . file ( document . path ) ;
306306 if ( ! this . isRazorDocumentOpenInCSharpWorkspace ( razorUri ) ) {
307307 this . didOpenRazorCSharpDocument ( razorUri ) ;
308308
Original file line number Diff line number Diff line change @@ -40,13 +40,13 @@ export class DynamicFileInfoHandler {
4040 const uris = request . razorFiles ;
4141 const virtualUris = new Array < DocumentUri | null > ( ) ;
4242 try {
43- for ( const razorDocumentUri of uris ) {
44- const vscodeUri = vscode . Uri . parse ( ' file:' + razorDocumentUri , true ) ;
43+ for ( const razorDocumentPath of uris ) {
44+ const vscodeUri = vscode . Uri . file ( razorDocumentPath ) ;
4545 const razorDocument = await this . documentManager . getDocument ( vscodeUri ) ;
4646 if ( razorDocument === undefined ) {
4747 virtualUris . push ( null ) ;
4848 this . logger . logWarning (
49- `Could not find Razor document ${ razorDocumentUri } ; adding null as a placeholder in URI array.`
49+ `Could not find Razor document ${ razorDocumentPath } ; adding null as a placeholder in URI array.`
5050 ) ;
5151 } else {
5252 // Retrieve generated doc URIs for each Razor URI we are given
@@ -70,8 +70,8 @@ export class DynamicFileInfoHandler {
7070 private async removeDynamicFileInfo ( request : RemoveDynamicFileParams ) {
7171 try {
7272 const uris = request . razorFiles ;
73- for ( const razorDocumentUri of uris ) {
74- const vscodeUri = vscode . Uri . parse ( ' file:' + razorDocumentUri , true ) ;
73+ for ( const razorDocumentPath of uris ) {
74+ const vscodeUri = vscode . Uri . file ( razorDocumentPath ) ;
7575 if ( this . documentManager . isRazorDocumentOpenInCSharpWorkspace ( vscodeUri ) ) {
7676 this . documentManager . didCloseRazorCSharpDocument ( vscodeUri ) ;
7777 }
You can’t perform that action at this time.
0 commit comments