Closed romgrk closed 1 year ago
@Iron-E @tobealive I have reverted some of the offset truncation changes, they were causing issues and I didn't want to debug here.
Regarding the changes, I also think they weren't optimal, the groups
functions are meant to be as pure as possible, we shouldn't add render-specific logic in them, they're here to slice stuff that has already been computed. If we want to add an ellipsis, it should be computed at the layout phase.
A good next refactoring step could be to extract all of them into lua/barbar/groups.lua
.
I have reverted some of the offset truncation changes, they were causing issues and I didn't want to debug here.
Thanks for the info @romgrk! Should have checked better that this isn't just handling the sidebar offset. But this re-introduced a shifted offset on truncation. Should there be some separate handling of the sidebar offset truncation or will #68 tackle this as well? Let me know if I can help out somehow.
We should add the truncation logic again, but it should be handled outside of slice_groups_right
, which is too low-level for this kind of logic.
A few things happening here:
render.update(...)
in two, extract tabs calculationreal_...
tocomputed_...
@Iron-E This might conflict with some of your changes but I'd rather we merge this first, these changes will help us maintain the plugin better.