on master help sign in
Revert "Convert Windows style path separator in completers to Unix style (#1389)"
bed9aceBlaž Hrastnik
helix-term/src/ui/mod.rs+2−7
@@ -313,7 +313,7 @@ pub mod completers {
313 return None;
313 return None;
314 }
314 }
315
315
316− let is_dir = entry.file_type().map_or(false, |entry| entry.is_dir());
316+ //let is_dir = entry.file_type().map_or(false, |entry| entry.is_dir());
317
317
318 let path = entry.path();
318 let path = entry.path();
319 let mut path = if is_tilde {
319 let mut path = if is_tilde {
@@ -331,12 +331,7 @@ pub mod completers {
331 path.push("");
331 path.push("");
332 }
332 }
333
333
334− let path = if cfg!(windows) && is_dir {
335− // Convert Windows style path separator to Unix style
336− path.to_str().unwrap().replace("\\", "/")
337− } else {
338− path.to_str().unwrap().to_owned()
334+ let path = path.to_str().unwrap().to_owned();
339− };
340 Some((end.clone(), Cow::from(path)))
335 Some((end.clone(), Cow::from(path)))
341 })
336 })
342 }) // TODO: unwrap or skip
337 }) // TODO: unwrap or skip