Describe the bug
Built-in isSet function is returning false when a value is set. This impacts GetBorderLeft and border rendering when setting a custom border.
To Reproduce
Add the source code to a test file, then run go test -run TestIsSet
Source Code
func TestIsSet(t *testing.T) {
leftOnly := NewStyle().
BorderStyle(Border{Left: " new "}).
BorderForeground(Color("#FFA500"))
got := leftOnly.isSet(borderLeftKey)
if got != true {
t.Fatalf("expected the left border to be set, got: %#v, but the left border is: %#v", got, leftOnly.borderStyle.Left)
}
}
gives:
--- FAIL: TestIsSet (0.00s)
style_test.go:550: expected the left border to be set, got: false, but the left border is: " new "
FAIL
Expected behavior
I would expect the borderLeftKey to be set
Additional context
This is likely related to other reported border and frame size issues.
Describe the bug
Built-in
isSetfunction is returningfalsewhen a value is set. This impactsGetBorderLeftand border rendering when setting a custom border.To Reproduce
Add the source code to a test file, then run
go test -run TestIsSetSource Code
gives:
--- FAIL: TestIsSet (0.00s) style_test.go:550: expected the left border to be set, got: false, but the left border is: " new " FAILExpected behavior
I would expect the
borderLeftKeyto be setAdditional context
This is likely related to other reported border and frame size issues.