comparison src/evalfunc.c @ 19934:3ff714d765ba v8.2.0523

patch 8.2.0523: loops are repeated Commit: https://github.com/vim/vim/commit/00d253e2b2f435a5386582c3f857008e7ac355c2 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 6 22:13:01 2020 +0200 patch 8.2.0523: loops are repeated Problem: Loops are repeated. Solution: Use FOR_ALL_ macros. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5882)
author Bram Moolenaar <Bram@vim.org>
date Mon, 06 Apr 2020 22:15:39 +0200
parents 1f42c49c3d29
children 724417668d42
comparison
equal deleted inserted replaced
19933:005e707a7988 19934:3ff714d765ba
5006 msg_scroll = TRUE; 5006 msg_scroll = TRUE;
5007 msg_clr_eos(); 5007 msg_clr_eos();
5008 5008
5009 l = argvars[0].vval.v_list; 5009 l = argvars[0].vval.v_list;
5010 range_list_materialize(l); 5010 range_list_materialize(l);
5011 FOR_ALL_LIST_ITEMS(argvars[0].vval.v_list, li) 5011 FOR_ALL_LIST_ITEMS(l, li)
5012 { 5012 {
5013 msg_puts((char *)tv_get_string(&li->li_tv)); 5013 msg_puts((char *)tv_get_string(&li->li_tv));
5014 msg_putchar('\n'); 5014 msg_putchar('\n');
5015 } 5015 }
5016 5016
7315 curallocval = allocval; 7315 curallocval = allocval;
7316 7316
7317 if (ll != NULL) 7317 if (ll != NULL)
7318 { 7318 {
7319 range_list_materialize(ll); 7319 range_list_materialize(ll);
7320 for (li = ll->lv_first; li != NULL; li = li->li_next) 7320 FOR_ALL_LIST_ITEMS(ll, li)
7321 { 7321 {
7322 strval = tv_get_string_buf_chk(&li->li_tv, buf); 7322 strval = tv_get_string_buf_chk(&li->li_tv, buf);
7323 if (strval == NULL) 7323 if (strval == NULL)
7324 goto free_lstval; 7324 goto free_lstval;
7325 if (strval == buf) 7325 if (strval == buf)