mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 17:36:19 +04:00
Revert "Convert Windows style path separator in completers to Unix style (#1389)"
This reverts commit 49444f9c05
.
This commit is contained in:
parent
bd0d20a2b3
commit
bed9aced5f
@ -313,7 +313,7 @@ fn filename_impl<F>(input: &str, filter_fn: F) -> Vec<Completion>
|
|||||||
return None;
|
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 path = entry.path();
|
||||||
let mut path = if is_tilde {
|
let mut path = if is_tilde {
|
||||||
@ -331,12 +331,7 @@ fn filename_impl<F>(input: &str, filter_fn: F) -> Vec<Completion>
|
|||||||
path.push("");
|
path.push("");
|
||||||
}
|
}
|
||||||
|
|
||||||
let path = if cfg!(windows) && is_dir {
|
let path = path.to_str().unwrap().to_owned();
|
||||||
// Convert Windows style path separator to Unix style
|
|
||||||
path.to_str().unwrap().replace("\\", "/")
|
|
||||||
} else {
|
|
||||||
path.to_str().unwrap().to_owned()
|
|
||||||
};
|
|
||||||
Some((end.clone(), Cow::from(path)))
|
Some((end.clone(), Cow::from(path)))
|
||||||
})
|
})
|
||||||
}) // TODO: unwrap or skip
|
}) // TODO: unwrap or skip
|
||||||
|
Loading…
Reference in New Issue
Block a user