This change allows one to apply split options that affect the size of either area elements in a split, whereas previously only the first area element could be explicitly sized.
Users can accomplish this by providing SplitFixedFromEnd or SpltPercentFromEnd options to containers, mirroring the existing SplitFixed and SplitPercent.
A list of changes involved in this PR include:
Adding a new boolean container option splitReversed to indicate when the alternative area should be targeted with an explicit size. By default, this is false, retaining existing behavior.
Adds public container option functions SplitFixedFromEnd and SplitPercentFromEnd.
For fixed split math, adds private module functions HSplitReversed and VSplitReversed to mirror HSplit and VSplit. Common logic for these functions is isolated to private hSplit and vSplit functions used respectively. Added similar functions for percentage variants.
This change allows one to apply split options that affect the size of either area elements in a split, whereas previously only the first area element could be explicitly sized.
Users can accomplish this by providing
SplitFixedFromEnd
orSpltPercentFromEnd
options to containers, mirroring the existingSplitFixed
andSplitPercent
.A list of changes involved in this PR include:
splitReversed
to indicate when the alternative area should be targeted with an explicit size. By default, this isfalse
, retaining existing behavior.SplitFixedFromEnd
andSplitPercentFromEnd
.HSplitReversed
andVSplitReversed
to mirrorHSplit
andVSplit
. Common logic for these functions is isolated to privatehSplit
andvSplit
functions used respectively. Added similar functions for percentage variants.Fixes https://github.com/mum4k/termdash/issues/292