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 both GetHorizontalBorderSize and GetVerticalBorderSize #225

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

nervo
Copy link
Contributor

@nervo nervo commented Sep 16, 2023

In both GetHorizontalBorderSize and GetVerticalBorderSize, computing size directly using getBorderStyle() can not take into accounts that some borders ("top", maybe "right", "bottom", whatever...) could have been disabled, leading to incorrect results.

This is well done in each individual GetBorder[Top|Right|Bottom|Left]Sizelike this:

lipgloss/get.go

Lines 303 to 305 in df8b3fa

if !s.getAsBool(borderTopKey, false) {
return 0
}

So this pull request just make use of this correct behavior :)

@maaslalani maaslalani merged commit b0eb95d into charmbracelet:master Oct 5, 2023
9 checks passed
@maaslalani
Copy link
Contributor

Thanks so much @nervo! We really appreciate the PRs!

@nervo nervo deleted the fix-GetBorderSizes branch October 12, 2023 06:37
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.

2 participants