Commit Graph

5 Commits (0f5430ab9eb7049c26ee65e27f14812f91a232d5)

Author SHA1 Message Date
mo8it 0f5430ab9e Optimize get_truncated_path 2 months ago
mo8it e91ec8e880 Optimize getting a relative path 2 months ago
mo8it 6ed93b6e49 Optimize fold_home_dir 2 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
3 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).
5 months ago