summaryrefslogtreecommitdiffstats
path: root/src/insexpand.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-02 18:50:46 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-02 18:50:46 +0200
commitaeea72151c31d686bcbb7b06d895006d7363585c (patch)
tree500d487503a1a82cecc8f2a3e9bf89b50638fe5a /src/insexpand.c
parentf10806b25090879fdc1a86cc0da2f4f34fd21921 (diff)
patch 8.2.0500: using the same loop in many placesv8.2.0500
Problem: Using the same loop in many places. Solution: Define more FOR_ALL macros. (Yegappan Lakshmanan, closes #5339)
Diffstat (limited to 'src/insexpand.c')
-rw-r--r--src/insexpand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/insexpand.c b/src/insexpand.c
index 0b2435f4ce..259acb91a5 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -2331,7 +2331,7 @@ ins_compl_add_list(list_T *list)
// Go through the List with matches and add each of them.
range_list_materialize(list);
- for (li = list->lv_first; li != NULL; li = li->li_next)
+ FOR_ALL_LIST_ITEMS(list, li)
{
if (ins_compl_add_tv(&li->li_tv, dir) == OK)
// if dir was BACKWARD then honor it just once
@@ -2513,7 +2513,7 @@ get_complete_info(list_T *what_list, dict_T *retdict)
{
what_flag = 0;
range_list_materialize(what_list);
- for (item = what_list->lv_first; item != NULL; item = item->li_next)
+ FOR_ALL_LIST_ITEMS(what_list, item)
{
char_u *what = tv_get_string(&item->li_tv);