extrawurst / gitui

Blazing 💥 fast terminal-ui for git written in rust 🦀
MIT License
18.62k stars 573 forks source link

Refactor text overflow solution #2364

Open robin-thoene opened 2 months ago

robin-thoene commented 2 months ago

Is your feature request related to a problem? Please describe. At different places inside the source code it is necessary to render text that is overflowing the width by shortening it and displaying three dots '...' at the end/start instead of the full text.

This code is duplicated and the refactoring should provide a centralized way to handle this without duplicating code.

Additional context Caught attention in PR #2350 for issue #2172