Closed akiomik closed 9 months ago
For reference, I am controlling this by adding a method to Listable
that tells it that it is an item to be truncated. But, TBH, this is not a smart way.
https://github.com/preiter93/tui-widget-list/compare/main...akiomik:tui-widget-list:truncate-top
Hey, that was something I wanted to look into
I wonder if we can instead render the truncated element in a temporary buffer and then copy the rows from the temporary buffer over into the real buffer 🤔 I think I will take a look at it this weekend
@akiomik can you checkout https://github.com/preiter93/tui-widget-list/pull/7 if this is what you are looking for?
Brilliant! It worked perfectly in the social client I am developing 💯
great! The fix is published in 0.6.1
Thank you for your kind cooperation😸
Thank you for creating this awesome library!
As noted in the comments below, the top item may look a bit strange when the
truncate
option is enabled.https://github.com/preiter93/tui-widget-list/blob/1fd8f81ee4006852411a22051c70986d05cce451/src/state.rs#L153-L155
If possible, it would be great if you could add an option to control the truncation of the top item.