kamiyaa / joshuto

ranger-like terminal file manager written in Rust
https://crates.io/crates/joshuto
GNU Lesser General Public License v3.0
3.4k stars 150 forks source link

Fix: remove an extra level of folder in topbar shorttened pathname #337

Closed Ainevsia closed 1 year ago

Ainevsia commented 1 year ago

This pull request is a fix to the topbar current directory name display in the shorttened version.

The original behavior is somewhat comfusing that the last directory name is displayed twice, both the shorttened one character name and the full name.

eg. the working directory is /home/ainevsia/test/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbb/cccccccccccccccccccccccccccccccccccc

the top bar is displaying /h/a/t/a/b/c/cccccccccccccccccccccccccccccccccccc

which should be /h/a/t/a/b/cccccccccccccccccccccccccccccccccccc

kamiyaa commented 1 year ago

Resolved in e10fae7255557df4e6c2b63a944357cae6b7d94f via https://github.com/kamiyaa/joshuto/commit/e10fae7255557df4e6c2b63a944357cae6b7d94f#diff-bc5b771db150ef2cb1b96a55eadebd53ae3f583ed5f747bbe98ccf73e2961e94L38-L39