[ncurses6] Suppress tui.Italic on ncurses 5

This commit is contained in:
Junegunn Choi 2016-11-24 13:42:14 +09:00
parent 182a6d99fd
commit 746961bf43
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -39,9 +39,10 @@ const (
Blink = C.A_BLINK Blink = C.A_BLINK
Reverse = C.A_REVERSE Reverse = C.A_REVERSE
Underline = C.A_UNDERLINE Underline = C.A_UNDERLINE
Italic = C.A_VERTICAL << 1 // FIXME
) )
var Italic Attr = C.A_VERTICAL << 1 // FIXME
const ( const (
AttrRegular Attr = 0 AttrRegular Attr = 0
) )
@ -71,6 +72,9 @@ var (
func init() { func init() {
_colorMap = make(map[int]ColorPair) _colorMap = make(map[int]ColorPair)
if strings.HasPrefix(C.GoString(C.curses_version()), "ncurses 5") {
Italic = C.A_NORMAL
}
} }
func (a Attr) Merge(b Attr) Attr { func (a Attr) Merge(b Attr) Attr {