mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
eea061db56
* refactor: simplify DisplayItemName struct and improve dired position handling This commit refactors the `display_item_name` function to return a `DisplayItemName` struct containing both the displayed name and its dired length, rather than just the OsString. This change simplifies the code by: 1. Eliminating the need to call `dired_name_len()` separately after getting the displayed name 2. Reducing redundant length calculations in the dired position handling 3. Making the code more maintainable by encapsulating related data together The change also fixes an issue where dired positions were being calculated incorrectly for symlink names that required quoting, ensuring proper highlighting in dired mode. Closes: #10248