Commit Graph

6 Commits (fd1e45400a8b1ee9e64b8935647112133497738d)

Author SHA1 Message Date
Mo 1d1087822a
Use the OS path separator instead of / (#10000) 8 months ago
mo8it 0f5430ab9e Optimize get_truncated_path 8 months ago
mo8it e91ec8e880 Optimize getting a relative path 8 months ago
mo8it 6ed93b6e49 Optimize fold_home_dir 8 months ago
Mo 6db666fce1
Optimization of tilde expansion (#9709)
* Use next and avoid a redundant prefix strip

* Avoid allocations

Especially when `expand_tilde` is claled on a path
that doesn't contain a tilde.

* Add a test

* Use Into<Cow<…>>

* Put the expand_tilde test at the end of the file

* Remove unused importsw
9 months ago
Michael Davis 1f916e65cf Create helix-stdx crate for stdlib extensions
helix-stdx is meant to carry extensions to the stdlib or low-level
dependencies that are useful in all other crates. This commit starts
with all of the path functions from helix-core and the CWD tracking that
lived in helix-loader.

The CWD tracking in helix-loader was previously unable to call the
canonicalization functions in helix-core. Switching to our custom
canonicalization code should make no noticeable difference though
since `std::env::current_dir` returns a canonicalized path with
symlinks resolved (at least on unix).
10 months ago