Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add an explicit AttrBlink

Passing AttrBold to the background causes blinking. This is undocumented
and unexpected. Make a new attribute AttrBlink instead, and observe this
attribute on either fg or bg (just like AttrReverse).
  • Loading branch information...
commit 6522df5cc0d8d30e495e04504ce467198c02a138 1 parent b16c3af
@kballard authored
Showing with 2 additions and 1 deletion.
  1. +1 −0  api_common.go
  2. +1 −1  termbox.go
View
1  api_common.go
@@ -129,6 +129,7 @@ const (
AttrBold Attribute = 1 << (iota + 4)
AttrUnderline
AttrReverse
+ AttrBlink
)
// Input mode. See SetInputMode function.
View
2  termbox.go
@@ -123,7 +123,7 @@ func send_attr(fg, bg Attribute) {
if fg&AttrBold != 0 {
outbuf.WriteString(funcs[t_bold])
}
- if bg&AttrBold != 0 {
+ if fg&AttrBlink|bg&AttrBlink != 0 {
outbuf.WriteString(funcs[t_blink])
}
if fg&AttrUnderline != 0 {
Please sign in to comment.
Something went wrong with that request. Please try again.