diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-02 18:50:46 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-02 18:50:46 +0200 |
commit | aeea72151c31d686bcbb7b06d895006d7363585c (patch) | |
tree | 500d487503a1a82cecc8f2a3e9bf89b50638fe5a /src/tag.c | |
parent | f10806b25090879fdc1a86cc0da2f4f34fd21921 (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/tag.c')
-rw-r--r-- | src/tag.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |