summaryrefslogtreecommitdiff
path: root/src/core/wee-completion.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/wee-completion.c')
-rw-r--r--src/core/wee-completion.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/core/wee-completion.c b/src/core/wee-completion.c
index 4c5fbb12d..150ce8b1d 100644
--- a/src/core/wee-completion.c
+++ b/src/core/wee-completion.c
@@ -1648,7 +1648,7 @@ completion_list_add_keys_contexts_cb (const void *pointer, void *data,
struct t_gui_buffer *buffer,
struct t_gui_completion *completion)
{
- int i;
+ int context;
/* make C compiler happy */
(void) pointer;
@@ -1656,9 +1656,9 @@ completion_list_add_keys_contexts_cb (const void *pointer, void *data,
(void) completion_item;
(void) buffer;
- for (i = 0; i < GUI_KEY_NUM_CONTEXTS; i++)
+ for (context = 0; context < GUI_KEY_NUM_CONTEXTS; context++)
{
- gui_completion_list_add (completion, gui_key_context_string[i],
+ gui_completion_list_add (completion, gui_key_context_string[context],
0, WEECHAT_LIST_POS_END);
}
@@ -1675,7 +1675,7 @@ completion_list_add_keys_codes_cb (const void *pointer, void *data,
struct t_gui_buffer *buffer,
struct t_gui_completion *completion)
{
- int i;
+ int context;
struct t_gui_key *ptr_key;
/* make C compiler happy */
@@ -1684,9 +1684,9 @@ completion_list_add_keys_codes_cb (const void *pointer, void *data,
(void) completion_item;
(void) buffer;
- for (i = 0; i < GUI_KEY_NUM_CONTEXTS; i++)
+ for (context = 0; context < GUI_KEY_NUM_CONTEXTS; context++)
{
- for (ptr_key = gui_keys[i]; ptr_key; ptr_key = ptr_key->next_key)
+ for (ptr_key = gui_keys[context]; ptr_key; ptr_key = ptr_key->next_key)
{
gui_completion_list_add (completion, ptr_key->key,
0, WEECHAT_LIST_POS_SORT);
@@ -1707,7 +1707,7 @@ completion_list_add_keys_codes_for_reset_cb (const void *pointer, void *data,
struct t_gui_buffer *buffer,
struct t_gui_completion *completion)
{
- int i;
+ int context;
struct t_gui_key *ptr_key, *ptr_default_key;
/* make C compiler happy */
@@ -1716,12 +1716,13 @@ completion_list_add_keys_codes_for_reset_cb (const void *pointer, void *data,
(void) completion_item;
(void) buffer;
- for (i = 0; i < GUI_KEY_NUM_CONTEXTS; i++)
+ for (context = 0; context < GUI_KEY_NUM_CONTEXTS; context++)
{
/* keys added or redefined */
- for (ptr_key = gui_keys[i]; ptr_key; ptr_key = ptr_key->next_key)
+ for (ptr_key = gui_keys[context]; ptr_key; ptr_key = ptr_key->next_key)
{
- ptr_default_key = gui_key_search (gui_default_keys[i], ptr_key->key);
+ ptr_default_key = gui_key_search (gui_default_keys[context],
+ ptr_key->key);
if (!ptr_default_key
|| (strcmp (ptr_default_key->command, ptr_key->command) != 0))
{
@@ -1731,10 +1732,11 @@ completion_list_add_keys_codes_for_reset_cb (const void *pointer, void *data,
}
/* keys deleted */
- for (ptr_default_key = gui_default_keys[i]; ptr_default_key;
+ for (ptr_default_key = gui_default_keys[context]; ptr_default_key;
ptr_default_key = ptr_default_key->next_key)
{
- ptr_key = gui_key_search (gui_keys[i], ptr_default_key->key);
+ ptr_key = gui_key_search (gui_keys[context],
+ ptr_default_key->key);
if (!ptr_key)
{
gui_completion_list_add (completion, ptr_default_key->key,