aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-01-05 01:58:12 +0000
committerBlaž Hrastnik2022-01-05 01:58:12 +0000
commitbed9aced5f4d745d74ffff1c10b6dc4acef8129e (patch)
tree304ab0d558a58d31c9230f954bc07e4729c40e3b
parentbd0d20a2b34f3cccd7f3ea1e988bf4b68e75d6b4 (diff)
Revert "Convert Windows style path separator in completers to Unix style (#1389)"
This reverts commit 49444f9c0569a070ffd3c82cee6146656a0ac63c.
-rw-r--r--helix-term/src/ui/mod.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index 9bf88840..9e096311 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -313,7 +313,7 @@ pub mod completers {
return None;
}
- let is_dir = entry.file_type().map_or(false, |entry| entry.is_dir());
+ //let is_dir = entry.file_type().map_or(false, |entry| entry.is_dir());
let path = entry.path();
let mut path = if is_tilde {
@@ -331,12 +331,7 @@ pub mod completers {
path.push("");
}
- let path = if cfg!(windows) && is_dir {
- // Convert Windows style path separator to Unix style
- path.to_str().unwrap().replace("\\", "/")
- } else {
- path.to_str().unwrap().to_owned()
- };
+ let path = path.to_str().unwrap().to_owned();
Some((end.clone(), Cow::from(path)))
})
}) // TODO: unwrap or skip