Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion get.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func (s Style) getAsBool(k propKey, defaultVal bool) bool {
if !s.isSet(k) {
return defaultVal
}
return s.attrs&int(k) != 0
return s.attrs&int64(k) != 0
}

func (s Style) getAsColor(k propKey) TerminalColor {
Expand Down
12 changes: 6 additions & 6 deletions set.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ func (s *Style) set(key propKey, value interface{}) {
default:
if v, ok := value.(bool); ok { //nolint:nestif
if v {
s.attrs |= int(key)
s.attrs |= int64(key)
} else {
s.attrs &^= int(key)
s.attrs &^= int64(key)
}
} else if attrs, ok := value.(int); ok {
} else if attrs, ok := value.(int64); ok {
// bool attrs
if attrs&int(key) != 0 {
s.attrs |= int(key)
if attrs&int64(key) != 0 {
s.attrs |= int64(key)
} else {
s.attrs &^= int(key)
s.attrs &^= int64(key)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion style.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ type Style struct {
value string

// we store bool props values here
attrs int
attrs int64

// props that have values
fgColor TerminalColor
Expand Down