feat: support untitled url scheme for unsaved documents (#120)

This commit is contained in:
Myriad-Dreamin 2024-03-29 15:26:46 +08:00 committed by GitHub
parent d53bd80d14
commit 529b422189
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 202 additions and 100 deletions

View file

@ -48,7 +48,7 @@ impl SemanticRequest for RenameRequest {
let def_source = ctx.source_by_id(lnk.fid).ok()?;
let span_path = ctx.path_for_id(lnk.fid).ok()?;
let uri = Url::from_file_path(span_path).ok()?;
let uri = path_to_url(&span_path).ok()?;
let Some(range) = lnk.name_range else {
log::warn!("rename: no name range");