From 8afc0282f28e73cf78d1bd7b11d78fd853ae2036 Mon Sep 17 00:00:00 2001 From: Yomain Date: Tue, 11 Jul 2023 19:51:04 +0200 Subject: Fix crash when cwd is deleted (#7185) --- helix-lsp/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-lsp') 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); -- cgit v1.2.3-70-g09d2