From b081d831e6168c951786a05f11063c1bd26c53fd Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 12 Nov 2005 11:45:59 +0000 Subject: Added color reset attr (%O) for messages encoding --- src/gui/curses/gui-display.c | 9 +++++++-- weechat/src/gui/curses/gui-display.c | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c index e9670ff1b..ffcd3d6bc 100644 --- a/src/gui/curses/gui-display.c +++ b/src/gui/curses/gui-display.c @@ -305,11 +305,12 @@ gui_color_decode_for_user_entry (unsigned char *string) case GUI_ATTR_FIXED_CHAR: string++; break; - case GUI_ATTR_REVERSE_CHAR: + case GUI_ATTR_RESET_CHAR: out[out_pos++] = '%'; - out[out_pos++] = 'R'; + out[out_pos++] = 'O'; string++; break; + case GUI_ATTR_REVERSE_CHAR: case GUI_ATTR_REVERSE2_CHAR: out[out_pos++] = '%'; out[out_pos++] = 'R'; @@ -403,6 +404,10 @@ gui_color_encode (unsigned char *string) } } break; + case 'O': /* reset */ + out[out_pos++] = GUI_ATTR_RESET_CHAR; + string++; + break; case 'R': /* reverse */ out[out_pos++] = GUI_ATTR_REVERSE_CHAR; string++; diff --git a/weechat/src/gui/curses/gui-display.c b/weechat/src/gui/curses/gui-display.c index e9670ff1b..ffcd3d6bc 100644 --- a/weechat/src/gui/curses/gui-display.c +++ b/weechat/src/gui/curses/gui-display.c @@ -305,11 +305,12 @@ gui_color_decode_for_user_entry (unsigned char *string) case GUI_ATTR_FIXED_CHAR: string++; break; - case GUI_ATTR_REVERSE_CHAR: + case GUI_ATTR_RESET_CHAR: out[out_pos++] = '%'; - out[out_pos++] = 'R'; + out[out_pos++] = 'O'; string++; break; + case GUI_ATTR_REVERSE_CHAR: case GUI_ATTR_REVERSE2_CHAR: out[out_pos++] = '%'; out[out_pos++] = 'R'; @@ -403,6 +404,10 @@ gui_color_encode (unsigned char *string) } } break; + case 'O': /* reset */ + out[out_pos++] = GUI_ATTR_RESET_CHAR; + string++; + break; case 'R': /* reverse */ out[out_pos++] = GUI_ATTR_REVERSE_CHAR; string++; -- cgit v1.2.3