mirror of
https://github.com/mum4k/termdash.git
synced 2026-04-27 03:15:55 +03:00
[PR #373] [MERGED] Allow alternative area explicit sizing in splits #366
Labels
No labels
bug
cleanup
enhancement
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/termdash#366
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mum4k/termdash/pull/373
Author: @spacez320
Created: 3/5/2024
Status: ✅ Merged
Merged: 3/10/2024
Merged by: @mum4k
Base:
devel← Head:292-allow-splitfixed-to-set-the-size-of-the-second-container📝 Commits (10+)
bc63a16Merge pull request #370 from mum4k/release_v0_19_04465700Allow reverse horizontal area splits275c62fRestore HSplitCells to original function signature610a070Add test for HSplitCellsReversedca93ed8Define shared logic for vertical cell splits992d7f3Lint fixes5b66484Reversed split for percentages029ce61Linting adjustmentsedab304Function re-orderingec14443More documentation updates📊 Changes
5 files changed (+651 additions, -35 deletions)
View changed files
📝
container/container.go(+12 -0)📝
container/container_test.go(+105 -1)📝
container/options.go(+57 -10)📝
private/area/area.go(+142 -24)📝
private/area/area_test.go(+335 -0)📄 Description
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
SplitFixedFromEndorSpltPercentFromEndoptions to containers, mirroring the existingSplitFixedandSplitPercent.A list of changes involved in this PR include:
splitReversedto indicate when the alternative area should be targeted with an explicit size. By default, this isfalse, retaining existing behavior.SplitFixedFromEndandSplitPercentFromEnd.HSplitReversedandVSplitReversedto mirrorHSplitandVSplit. Common logic for these functions is isolated to privatehSplitandvSplitfunctions used respectively. Added similar functions for percentage variants.Fixes https://github.com/mum4k/termdash/issues/292
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.