1
0
forked from aniani/vim

patch 8.2.0500: using the same loop in many places

Problem:    Using the same loop in many places.
Solution:   Define more FOR_ALL macros. (Yegappan Lakshmanan, closes #5339)
This commit is contained in:
Bram Moolenaar
2020-04-02 18:50:46 +02:00
parent f10806b250
commit aeea72151c
34 changed files with 176 additions and 141 deletions

View File

@@ -1358,7 +1358,7 @@ find_tagfunc_tags(
}
taglist = rettv.vval.v_list;
for (item = taglist->lv_first; item != NULL; item = item->li_next)
FOR_ALL_LIST_ITEMS(taglist, item)
{
char_u *mfp;
char_u *res_name, *res_fname, *res_cmd, *res_kind;
@@ -4191,7 +4191,7 @@ tagstack_push_items(win_T *wp, list_T *l)
int fnum;
// Add one entry at a time to the tag stack
for (li = l->lv_first; li != NULL; li = li->li_next)
FOR_ALL_LIST_ITEMS(l, li)
{
if (li->li_tv.v_type != VAR_DICT || li->li_tv.vval.v_dict == NULL)
continue; // Skip non-dict items