diff options
author | Alexander Færøy <ahf@0x90.dk> | 2014-12-16 20:28:56 +0100 |
---|---|---|
committer | Alexander Færøy <ahf@0x90.dk> | 2014-12-16 20:28:56 +0100 |
commit | cd7a30bf9ade0e979b47c1b67bf770e13bfe82d6 (patch) | |
tree | cef64023ea351d9754ba0cd662ec11364f0d2f3a | |
parent | bbf84d41a48f7e76487d8a4bfd5345fc252c7d9c (diff) | |
parent | 367d8efc5ffca32ce6a6407fddb5253ed9eab1a4 (diff) | |
download | irssi-cd7a30bf9ade0e979b47c1b67bf770e13bfe82d6.zip |
Merge pull request #189 from dequis/colorless-green-ideas-blink-furiously
Fix blinking/bold text in terminals with no color support
-rw-r--r-- | src/fe-text/term-terminfo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c index 29d3f7eb..ded79c28 100644 --- a/src/fe-text/term-terminfo.c +++ b/src/fe-text/term-terminfo.c @@ -390,7 +390,8 @@ void term_set_color(TERM_WINDOW *window, int col) } /* set background color */ - if (window && (term_color256map[bg&0xff]&8) == window->term->TI_colors) + if (window && window->term->TI_colors && + (term_color256map[bg&0xff]&8) == window->term->TI_colors) col |= ATTR_BLINK; if (col & ATTR_BLINK) current_term->set_blink(current_term); @@ -413,7 +414,8 @@ void term_set_color(TERM_WINDOW *window, int col) terminfo_set_reverse(); /* bold */ - if (window && (term_color256map[fg&0xff]&8) == window->term->TI_colors) + if (window && window->term->TI_colors && + (term_color256map[fg&0xff]&8) == window->term->TI_colors) col |= ATTR_BOLD; if (col & ATTR_BOLD) terminfo_set_bold(); |