mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 20:03:48 -05:00
When a path is rendered in the Bookmarks area or as the header line of the tree, it is truncated if there is no enough space for it. But if a path contains multi-byte characters, it should be truncated by characters, not bytes, otherwise the path may be truncated between the bytes of a multi-byte character. To deal with multi-byte characters, use strdisplaywidth() instead of len() to get the number of display cells, and use strcharpart() instead of strpart() to truncate a path.