mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Reformat color.c
This commit is contained in:
parent
8a04496c79
commit
df1b19ecec
@ -355,8 +355,8 @@ static int find_col(const char *col_name, int n)
|
|||||||
void color_pair_cache_reset(void)
|
void color_pair_cache_reset(void)
|
||||||
{
|
{
|
||||||
if (cache.pairs) {
|
if (cache.pairs) {
|
||||||
free(cache.pairs);
|
free(cache.pairs);
|
||||||
memset(&cache, 0, sizeof(cache));
|
memset(&cache, 0, sizeof(cache));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -398,9 +398,11 @@ int color_pair_cache_get(const char *pair_name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* try to find pair in cache */
|
/* try to find pair in cache */
|
||||||
for (i = 0; i < cache.size; i++)
|
for (i = 0; i < cache.size; i++) {
|
||||||
if (fg == cache.pairs[i].fg && bg == cache.pairs[i].bg)
|
if (fg == cache.pairs[i].fg && bg == cache.pairs[i].bg) {
|
||||||
return i;
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* otherwise cache new pair */
|
/* otherwise cache new pair */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user