diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-01-01 12:29:14 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-01-01 12:29:14 +0100 |
commit | 6cc9ce87777e6be7dbbe1bfc56ce20fce441782e (patch) | |
tree | 8faceb303ee10aab05901421e3cdc6d525986345 /src/plugins | |
parent | 90884e6b9ee410f88440f2c813f7a4fca2d137b5 (diff) | |
download | weechat-6cc9ce87777e6be7dbbe1bfc56ce20fce441782e.zip |
Fix color string returned by API function color() for some WeeChat color options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/plugin-api.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index db34f20c9..bab3f4391 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -215,16 +215,16 @@ plugin_api_prefix (const char *prefix) const char * plugin_api_color (const char *color_name) { - int num_color; + const char *str_color; if (!color_name) return GUI_NO_COLOR; /* name is a weechat color option ? => then return this color */ - num_color = gui_color_search_config_int (color_name); - if (num_color >= 0) - return GUI_COLOR(num_color); - + str_color = gui_color_search_config (color_name); + if (str_color) + return str_color; + return gui_color_get_custom (color_name); } |