aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp/src/lib.rs
diff options
context:
space:
mode:
authorYomain2023-07-11 17:51:04 +0000
committerGitHub2023-07-11 17:51:04 +0000
commit8afc0282f28e73cf78d1bd7b11d78fd853ae2036 (patch)
tree6742e141f051d352ebe7017f15805613670864b9 /helix-lsp/src/lib.rs
parent1adb19464f002926e1042027b41acef4c81585f6 (diff)
Fix crash when cwd is deleted (#7185)
Diffstat (limited to 'helix-lsp/src/lib.rs')
-rw-r--r--helix-lsp/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs
index 277a4c28..95c61086 100644
--- a/helix-lsp/src/lib.rs
+++ b/helix-lsp/src/lib.rs
@@ -931,7 +931,7 @@ pub fn find_lsp_workspace(
let mut file = if file.is_absolute() {
file.to_path_buf()
} else {
- let current_dir = std::env::current_dir().expect("unable to determine current directory");
+ let current_dir = helix_loader::current_working_dir();
current_dir.join(file)
};
file = path::get_normalized_path(&file);