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:
@@ -172,8 +172,7 @@ check_recorded_changes(
|
||||
linenr_T prev_lnum;
|
||||
linenr_T prev_lnume;
|
||||
|
||||
for (li = buf->b_recorded_changes->lv_first; li != NULL;
|
||||
li = li->li_next)
|
||||
FOR_ALL_LIST_ITEMS(buf->b_recorded_changes, li)
|
||||
{
|
||||
prev_lnum = (linenr_T)dict_get_number(
|
||||
li->li_tv.vval.v_dict, (char_u *)"lnum");
|
||||
@@ -362,8 +361,7 @@ invoke_listeners(buf_T *buf)
|
||||
argv[0].v_type = VAR_NUMBER;
|
||||
argv[0].vval.v_number = buf->b_fnum; // a:bufnr
|
||||
|
||||
|
||||
for (li = buf->b_recorded_changes->lv_first; li != NULL; li = li->li_next)
|
||||
FOR_ALL_LIST_ITEMS(buf->b_recorded_changes, li)
|
||||
{
|
||||
varnumber_T lnum;
|
||||
|
||||
|
Reference in New Issue
Block a user