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-term/src/commands/lsp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-term/src/commands/lsp.rs') diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs index 55153648..145bddd0 100644 --- a/helix-term/src/commands/lsp.rs +++ b/helix-term/src/commands/lsp.rs @@ -1033,7 +1033,7 @@ fn goto_impl( locations: Vec, offset_encoding: OffsetEncoding, ) { - let cwdir = std::env::current_dir().unwrap_or_default(); + let cwdir = helix_loader::current_working_dir(); match locations.as_slice() { [location] => { -- cgit v1.2.3-70-g09d2