diff options
author | Timo Sirainen <cras@irssi.org> | 2001-10-29 19:16:14 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-10-29 19:16:14 +0000 |
commit | 3d50a058b9acb3749dc372e84f307a2e1ccd9553 (patch) | |
tree | 8bb874e982d06d5425d5f83bc4fa9aabdba0486b /src/fe-text | |
parent | 3cdedf5b4b5c2281074838f2bf240f6e3a5940b8 (diff) | |
download | irssi-3d50a058b9acb3749dc372e84f307a2e1ccd9553.zip |
when colors aren't used, don't save last_fg and last_bg. This helps at least clrtoeol().
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1942 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/term-terminfo.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c index 56ae53c1..9f8b3b6f 100644 --- a/src/fe-text/term-terminfo.c +++ b/src/fe-text/term-terminfo.c @@ -224,9 +224,10 @@ void term_set_color(TERM_WINDOW *window, int col) /* set foreground color */ if ((col & 0x0f) != last_fg && ((col & 0x0f) != 0 || (col & ATTR_RESETFG) == 0)) { - last_fg = col & 0x0f; - if (term_use_colors) + if (term_use_colors) { + last_fg = col & 0x0f; terminfo_set_fg(last_fg); + } } /* set background color */ @@ -237,9 +238,10 @@ void term_set_color(TERM_WINDOW *window, int col) if ((col & 0xf0) >> 4 != last_bg && ((col & 0xf0) != 0 || (col & ATTR_RESETBG) == 0)) { - last_bg = (col & 0xf0) >> 4; - if (term_use_colors) + if (term_use_colors) { terminfo_set_bg(last_bg); + last_bg = (col & 0xf0) >> 4; + } } /* bold */ |