Skip to content

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
@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