summaryrefslogtreecommitdiff
path: root/helix-term/src/ui/mod.rs
diff options
context:
space:
mode:
authorYomain2023-07-11 17:51:04 +0000
committerGitHub2023-07-11 17:51:04 +0000
commit8afc0282f28e73cf78d1bd7b11d78fd853ae2036 (patch)
tree6742e141f051d352ebe7017f15805613670864b9 /helix-term/src/ui/mod.rs
parent1adb19464f002926e1042027b41acef4c81585f6 (diff)
Fix crash when cwd is deleted (#7185)
Diffstat (limited to 'helix-term/src/ui/mod.rs')
-rw-r--r--helix-term/src/ui/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index 155f2435..3359155d 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -472,7 +472,7 @@ pub mod completers {
match path.parent() {
Some(path) if !path.as_os_str().is_empty() => path.to_path_buf(),
// Path::new("h")'s parent is Some("")...
- _ => std::env::current_dir().expect("couldn't determine current directory"),
+ _ => helix_loader::current_working_dir(),
}
};