Skip to content

Commit

Permalink
Revert "Convert Windows style path separator in completers to Unix st…
Browse files Browse the repository at this point in the history
…yle (#1389)"

This reverts commit 49444f9.
  • Loading branch information
archseer committed Jan 5, 2022
1 parent bd0d20a commit bed9ace
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions helix-term/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit bed9ace

Please sign in to comment.