comparison src/tag.c @ 19888:435726a03481 v8.2.0500

patch 8.2.0500: using the same loop in many places Commit: https://github.com/vim/vim/commit/aeea72151c31d686bcbb7b06d895006d7363585c Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 2 18:50:46 2020 +0200 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 https://github.com/vim/vim/issues/5339)
author Bram Moolenaar <Bram@vim.org>
date Thu, 02 Apr 2020 19:00:05 +0200
parents 5ce724c60c4c
children 5feb426d2ea1
comparison
equal deleted inserted replaced
19887:d03edd8c7e2f 19888:435726a03481
1356 emsg(_(tfu_inv_ret_msg)); 1356 emsg(_(tfu_inv_ret_msg));
1357 return FAIL; 1357 return FAIL;
1358 } 1358 }
1359 taglist = rettv.vval.v_list; 1359 taglist = rettv.vval.v_list;
1360 1360
1361 for (item = taglist->lv_first; item != NULL; item = item->li_next) 1361 FOR_ALL_LIST_ITEMS(taglist, item)
1362 { 1362 {
1363 char_u *mfp; 1363 char_u *mfp;
1364 char_u *res_name, *res_fname, *res_cmd, *res_kind; 1364 char_u *res_name, *res_fname, *res_cmd, *res_kind;
1365 int len; 1365 int len;
1366 dict_iterator_T iter; 1366 dict_iterator_T iter;
4189 char_u *tagname; 4189 char_u *tagname;
4190 pos_T mark; 4190 pos_T mark;
4191 int fnum; 4191 int fnum;
4192 4192
4193 // Add one entry at a time to the tag stack 4193 // Add one entry at a time to the tag stack
4194 for (li = l->lv_first; li != NULL; li = li->li_next) 4194 FOR_ALL_LIST_ITEMS(l, li)
4195 { 4195 {
4196 if (li->li_tv.v_type != VAR_DICT || li->li_tv.vval.v_dict == NULL) 4196 if (li->li_tv.v_type != VAR_DICT || li->li_tv.vval.v_dict == NULL)
4197 continue; // Skip non-dict items 4197 continue; // Skip non-dict items
4198 itemdict = li->li_tv.vval.v_dict; 4198 itemdict = li->li_tv.vval.v_dict;
4199 4199