mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 03:03:12 +02:00
Add 256 colors support
Changes: - new section "palette" in weechat.conf - new API functions: list_search_pos and list_casesearch_pos
This commit is contained in:
@@ -1260,12 +1260,9 @@ config_file_option_set (struct t_config_option *option, const char *value,
|
||||
number = strtol (value + 2, &error, 10);
|
||||
if (error && !error[0])
|
||||
{
|
||||
number = number % (num_colors + 1);
|
||||
value_int = (old_value + number) %
|
||||
(num_colors + 1);
|
||||
if (value_int > num_colors - 1)
|
||||
value_int -= num_colors;
|
||||
if (value_int <= num_colors - 1)
|
||||
if (gui_color_assign_by_diff (&value_int,
|
||||
gui_color_get_name (old_value),
|
||||
number))
|
||||
new_value_ok = 1;
|
||||
}
|
||||
}
|
||||
@@ -1275,12 +1272,9 @@ config_file_option_set (struct t_config_option *option, const char *value,
|
||||
number = strtol (value + 2, &error, 10);
|
||||
if (error && !error[0])
|
||||
{
|
||||
number = number % (num_colors + 1);
|
||||
value_int = (old_value + num_colors - number) %
|
||||
num_colors;
|
||||
if (value_int < 0)
|
||||
value_int += num_colors;
|
||||
if (value_int >= 0)
|
||||
if (gui_color_assign_by_diff (&value_int,
|
||||
gui_color_get_name (old_value),
|
||||
-1 * number))
|
||||
new_value_ok = 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user