mirror of https://github.com/helix-editor/helix
fix :move panic when starting a new language server (#11387)
* fix move panic * change location of is initialized checkpull/11395/head
parent
86aecc96a1
commit
63953e0b9e
|
@ -1376,6 +1376,11 @@ impl Editor {
|
||||||
}
|
}
|
||||||
let is_dir = new_path.is_dir();
|
let is_dir = new_path.is_dir();
|
||||||
for ls in self.language_servers.iter_clients() {
|
for ls in self.language_servers.iter_clients() {
|
||||||
|
// A new language server might have been started in `set_doc_path` and won't
|
||||||
|
// be initialized yet. Skip the `did_rename` notification for this server.
|
||||||
|
if !ls.is_initialized() {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if let Some(notification) = ls.did_rename(old_path, &new_path, is_dir) {
|
if let Some(notification) = ls.did_rename(old_path, &new_path, is_dir) {
|
||||||
tokio::spawn(notification);
|
tokio::spawn(notification);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue