From 237f946a2ec80ea3bb2bd69c1932158c088989aa Mon Sep 17 00:00:00 2001 From: Alex Foulon Date: Fri, 8 Feb 2013 19:32:52 +0000 Subject: [PATCH] Fixed character attribute in ncurses driver. --- caca/driver/ncurses.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/caca/driver/ncurses.c b/caca/driver/ncurses.c index bfd6026..bac80d6 100644 --- a/caca/driver/ncurses.c +++ b/caca/driver/ncurses.c @@ -365,7 +365,16 @@ static void ncurses_display(caca_display_t *dp) move(y, dx); for(x = dx; x < dx + dw; x++) { - (void)attrset(dp->drv.p->attr[caca_attr_to_ansi(*cvattrs++)]); + uint32_t attr = *cvattrs++; + + (void)attrset(dp->drv.p->attr[caca_attr_to_ansi(attr)]); + if(attr & CACA_BOLD) + attron(A_BOLD); + if(attr & CACA_BLINK) + attron(A_BLINK); + if(attr & CACA_UNDERLINE) + attron(A_UNDERLINE); + ncurses_write_utf32(*cvchars++); }