mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 00:29:09 -05:00
fix(lsp): normalize urls in did_change_watched_files (#12873)
This commit is contained in:
parent
0ef5b21a3c
commit
47d516a4a0
1 changed files with 8 additions and 2 deletions
|
@ -930,9 +930,15 @@ impl Inner {
|
|||
.performance
|
||||
.mark("did_change_watched_files", Some(¶ms));
|
||||
let mut touched = false;
|
||||
let changes: Vec<Url> = params
|
||||
.changes
|
||||
.iter()
|
||||
.map(|f| self.url_map.normalize_url(&f.uri))
|
||||
.collect();
|
||||
|
||||
// if the current import map has changed, we need to reload it
|
||||
if let Some(import_map_uri) = &self.maybe_import_map_uri {
|
||||
if params.changes.iter().any(|fe| *import_map_uri == fe.uri) {
|
||||
if changes.iter().any(|uri| import_map_uri == uri) {
|
||||
if let Err(err) = self.update_import_map().await {
|
||||
self.client.show_message(MessageType::Warning, err).await;
|
||||
}
|
||||
|
@ -941,7 +947,7 @@ impl Inner {
|
|||
}
|
||||
// if the current tsconfig has changed, we need to reload it
|
||||
if let Some(config_uri) = &self.maybe_config_uri {
|
||||
if params.changes.iter().any(|fe| *config_uri == fe.uri) {
|
||||
if changes.iter().any(|uri| config_uri == uri) {
|
||||
if let Err(err) = self.update_config_file() {
|
||||
self.client.show_message(MessageType::Warning, err).await;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue