Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JoinVertical behavior for non-edge non-center alignments #49

Merged
merged 1 commit into from Feb 8, 2022

Conversation

trytriangles
Copy link
Contributor

Currently, JoinVertical displays like this:

JoinVertical(0.00, "A", "BBBB")
A   
BBBB


JoinVertical(0.25, "A", "BBBB")
  A 
BBBB


JoinVertical(0.75, "A", "BBBB")
 A  
BBBB


JoinVertical(1.00, "A", "BBBB")
   A
BBBB

It seems more natural that 0.25 would be 25% of the way from 0 to 1, and 0.75 would be 75% of the way from 0 to 1. This pull request switches to that behavior, and adds a regression test for the change.

@meowgorithm
Copy link
Member

meowgorithm commented Feb 8, 2022

Thanks so much for this one: it's been a longstanding one we've been meaning to fix. The regression test is super helpful too.

@meowgorithm meowgorithm merged commit f05ca49 into charmbracelet:master Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants